Cleanup tests
[oweals/peertube.git] / server / tests / api / server / no-client.ts
1 import 'mocha'
2 import * as request from 'supertest'
3 import {
4   flushTests,
5   killallServers,
6   ServerInfo
7 } from '../../../../shared/extra-utils'
8 import { flushAndRunServer } from '../../../../shared/extra-utils/server/servers'
9
10 describe('Start and stop server without web client routes', function () {
11   let server: ServerInfo
12
13   before(async function () {
14     this.timeout(30000)
15
16     server = await flushAndRunServer(1, {}, ['--no-client'])
17   })
18
19   it('Should fail getting the client', function () {
20     const req = request(server.url)
21       .get('/')
22
23     return req.expect(404)
24   })
25
26   after(function () {
27     killallServers([ server ])
28   })
29 })