re-add chai method imports in tests

pull/32/head
HardiReady 2018-03-12 12:35:19 +01:00
parent 73fa23567c
commit df12f5133c
8 changed files with 23 additions and 2 deletions

View File

@ -8,6 +8,9 @@ let chai = require('chai');
let chaiHttp = require('chai-http'); let chaiHttp = require('chai-http');
let server = require('../server'); let server = require('../server');
// chai methods
require('chai').should();
chai.use(chaiHttp); chai.use(chaiHttp);
// Our parent block // Our parent block
describe('Awardings', () => { describe('Awardings', () => {

View File

@ -8,6 +8,9 @@ let chai = require('chai');
let chaiHttp = require('chai-http'); let chaiHttp = require('chai-http');
let server = require('../server'); let server = require('../server');
// chai methods
require('chai').should();
chai.use(chaiHttp); chai.use(chaiHttp);
// Our parent block // Our parent block
describe('Command', () => { describe('Command', () => {

View File

@ -36,7 +36,7 @@ for (let i = 0; i < quantity; i++) {
username: createString('abcdefghijklmnopqrstuvwxyz0123456789', 10), username: createString('abcdefghijklmnopqrstuvwxyz0123456789', 10),
squadId: squadId, squadId: squadId,
rankLvl: Math.floor(Math.random() * 22), rankLvl: Math.floor(Math.random() * 22),
}, function(err, user) { }, (err, user) => {
if (err) { if (err) {
console.log(err); console.log(err);
} else { } else {
@ -47,7 +47,7 @@ for (let i = 0; i < quantity; i++) {
// If the Node process ends, close the Mongoose connection // If the Node process ends, close the Mongoose connection
process.on('SIGINT', () => { process.on('SIGINT', () => {
mongoose.connection.close(function() { mongoose.connection.close(() => {
console.log('Mongoose default connection disconnected through app termination'); console.log('Mongoose default connection disconnected through app termination');
process.exit(0); process.exit(0);
}); });

View File

@ -8,6 +8,9 @@ let chai = require('chai');
let chaiHttp = require('chai-http'); let chaiHttp = require('chai-http');
let server = require('../server'); let server = require('../server');
// chai methods
require('chai').should();
chai.use(chaiHttp); chai.use(chaiHttp);
// Our parent block // Our parent block
describe('Decorations', () => { describe('Decorations', () => {

View File

@ -8,6 +8,9 @@ let chai = require('chai');
let chaiHttp = require('chai-http'); let chaiHttp = require('chai-http');
let server = require('../server'); let server = require('../server');
// chai methods
require('chai').should();
chai.use(chaiHttp); chai.use(chaiHttp);
// Our parent block // Our parent block
describe('Ranks', () => { describe('Ranks', () => {

View File

@ -8,6 +8,9 @@ let chai = require('chai');
let chaiHttp = require('chai-http'); let chaiHttp = require('chai-http');
let server = require('../server'); let server = require('../server');
// chai methods
require('chai').should();
chai.use(chaiHttp); chai.use(chaiHttp);
// Our parent block // Our parent block
describe('Squads', () => { describe('Squads', () => {

View File

@ -8,6 +8,9 @@ let chai = require('chai');
let chaiHttp = require('chai-http'); let chaiHttp = require('chai-http');
let server = require('../server'); let server = require('../server');
// chai methods
require('chai').should();
chai.use(chaiHttp); chai.use(chaiHttp);
// Our parent block // Our parent block
describe('Users', () => { describe('Users', () => {

View File

@ -7,6 +7,9 @@ let chai = require('chai');
let chaiHttp = require('chai-http'); let chaiHttp = require('chai-http');
let server = require('../server'); let server = require('../server');
// chai methods
require('chai').should();
chai.use(chaiHttp); chai.use(chaiHttp);
// Our parent block // Our parent block
describe('Wars', () => { describe('Wars', () => {