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 () {
35 registerUser(server.url, 'user1', 'super password'),
36 registerUser(server.url, 'user2', 'super password'),
37 registerUser(server.url, 'user3', 'super password')
40 const res = await getConfig(server.url)
43 expect(data.signup.allowed).to.be.false
46 after(async function () {
47 process.kill(-server.app.pid)
49 // Keep the logs if the test failed