PeerTube/server/tests/api/server/no-client.ts

26 lines
640 B
TypeScript
Raw Normal View History

2018-11-14 08:27:47 -06:00
import 'mocha'
import * as request from 'supertest'
2019-04-24 08:10:37 -05:00
import { ServerInfo } from '../../../../shared/extra-utils'
import { cleanupTests, flushAndRunServer } from '../../../../shared/extra-utils/server/servers'
2018-11-14 08:27:47 -06:00
describe('Start and stop server without web client routes', function () {
let server: ServerInfo
before(async function () {
this.timeout(30000)
2019-04-24 03:53:40 -05:00
server = await flushAndRunServer(1, {}, ['--no-client'])
2018-11-14 08:27:47 -06:00
})
it('Should fail getting the client', function () {
const req = request(server.url)
.get('/')
return req.expect(404)
})
2019-04-24 08:10:37 -05:00
after(async function () {
await cleanupTests([ server ])
2018-11-14 08:27:47 -06:00
})
})