no-client.ts 640 B

12345678910111213141516171819202122232425
  1. import 'mocha'
  2. import * as request from 'supertest'
  3. import { ServerInfo } from '../../../../shared/extra-utils'
  4. import { cleanupTests, flushAndRunServer } from '../../../../shared/extra-utils/server/servers'
  5. describe('Start and stop server without web client routes', function () {
  6. let server: ServerInfo
  7. before(async function () {
  8. this.timeout(30000)
  9. server = await flushAndRunServer(1, {}, ['--no-client'])
  10. })
  11. it('Should fail getting the client', function () {
  12. const req = request(server.url)
  13. .get('/')
  14. return req.expect(404)
  15. })
  16. after(async function () {
  17. await cleanupTests([ server ])
  18. })
  19. })