]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/tests/api/server/no-client.ts
Fix dependency errors between modules
[github/Chocobozzz/PeerTube.git] / server / tests / api / server / no-client.ts
CommitLineData
b83b8dd5
RK
1import 'mocha'
2import * as request from 'supertest'
3import {
4 flushTests,
5 killallServers,
6 ServerInfo
92e07c3b 7} from '../../../../shared/utils'
8import { runServer } from '../../../../shared/utils/server/servers'
b83b8dd5
RK
9
10describe('Start and stop server without web client routes', function () {
11 let server: ServerInfo
12
13 before(async function () {
14 this.timeout(30000)
15
16 await flushTests()
17
18 server = await runServer(1, {}, ['--no-client'])
19 })
20
21 it('Should fail getting the client', function () {
22 const req = request(server.url)
23 .get('/')
24
25 return req.expect(404)
26 })
27
28 after(async function () {
29 killallServers([ server ])
30
31 // Keep the logs if the test failed
32 if (this['ok']) {
33 await flushTests()
34 }
35 })
36})