1 /* tslint:disable:no-unused-expression */
4 import * as chai from 'chai'
5 const expect = chai.expect
14 describe('Test config', function () {
17 before(async function () {
21 server = await runServer(1)
24 it('Should have a correct config on a server with registration enabled', async function () {
25 const res = await getConfig(server.url)
28 expect(data.signup.allowed).to.be.true
31 it('Should have a correct config on a server with registration enabled and a users limit', async function () {
33 registerUser(server.url, 'user1', 'super password'),
34 registerUser(server.url, 'user2', 'super password'),
35 registerUser(server.url, 'user3', 'super password')
38 const res = await getConfig(server.url)
41 expect(data.signup.allowed).to.be.false
44 after(async function () {
45 process.kill(-server.app.pid)
47 // Keep the logs if the test failed