]>
Commit | Line | Data |
---|---|---|
b83b8dd5 RK |
1 | import 'mocha' |
2 | import * as request from 'supertest' | |
7c3b7976 C |
3 | import { ServerInfo } from '../../../../shared/extra-utils' |
4 | import { cleanupTests, flushAndRunServer } from '../../../../shared/extra-utils/server/servers' | |
f2eb23cd | 5 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' |
b83b8dd5 RK |
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 | ||
a1587156 | 13 | server = await flushAndRunServer(1, {}, [ '--no-client' ]) |
b83b8dd5 RK |
14 | }) |
15 | ||
16 | it('Should fail getting the client', function () { | |
17 | const req = request(server.url) | |
18 | .get('/') | |
19 | ||
f2eb23cd | 20 | return req.expect(HttpStatusCode.NOT_FOUND_404) |
b83b8dd5 RK |
21 | }) |
22 | ||
7c3b7976 C |
23 | after(async function () { |
24 | await cleanupTests([ server ]) | |
b83b8dd5 RK |
25 | }) |
26 | }) |