]>
Commit | Line | Data |
---|---|---|
1 | import 'mocha' | |
2 | import * as request from 'supertest' | |
3 | import { cleanupTests, createSingleServer, PeerTubeServer } from '@shared/extra-utils' | |
4 | import { HttpStatusCode } from '@shared/models' | |
5 | ||
6 | describe('Start and stop server without web client routes', function () { | |
7 | let server: PeerTubeServer | |
8 | ||
9 | before(async function () { | |
10 | this.timeout(30000) | |
11 | ||
12 | server = await createSingleServer(1, {}, { peertubeArgs: [ '--no-client' ] }) | |
13 | }) | |
14 | ||
15 | it('Should fail getting the client', function () { | |
16 | const req = request(server.url) | |
17 | .get('/') | |
18 | ||
19 | return req.expect(HttpStatusCode.NOT_FOUND_404) | |
20 | }) | |
21 | ||
22 | after(async function () { | |
23 | await cleanupTests([ server ]) | |
24 | }) | |
25 | }) |