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

26 lines
668 B
TypeScript
Raw Normal View History

2018-11-14 08:27:47 -06:00
import 'mocha'
2021-08-27 07:32:44 -05:00
import request from 'supertest'
import { cleanupTests, createSingleServer, PeerTubeServer } from '@shared/server-commands'
2021-07-16 03:42:24 -05:00
import { HttpStatusCode } from '@shared/models'
2018-11-14 08:27:47 -06:00
describe('Start and stop server without web client routes', function () {
2021-07-16 02:47:51 -05:00
let server: PeerTubeServer
2018-11-14 08:27:47 -06:00
before(async function () {
this.timeout(30000)
2021-07-22 05:07:26 -05:00
server = await createSingleServer(1, {}, { peertubeArgs: [ '--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(HttpStatusCode.NOT_FOUND_404)
2018-11-14 08:27:47 -06:00
})
2019-04-24 08:10:37 -05:00
after(async function () {
await cleanupTests([ server ])
2018-11-14 08:27:47 -06:00
})
})