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