re-add chai method imports in tests
parent
73fa23567c
commit
df12f5133c
|
@ -8,6 +8,9 @@ let chai = require('chai');
|
|||
let chaiHttp = require('chai-http');
|
||||
let server = require('../server');
|
||||
|
||||
// chai methods
|
||||
require('chai').should();
|
||||
|
||||
chai.use(chaiHttp);
|
||||
// Our parent block
|
||||
describe('Awardings', () => {
|
||||
|
|
|
@ -8,6 +8,9 @@ let chai = require('chai');
|
|||
let chaiHttp = require('chai-http');
|
||||
let server = require('../server');
|
||||
|
||||
// chai methods
|
||||
require('chai').should();
|
||||
|
||||
chai.use(chaiHttp);
|
||||
// Our parent block
|
||||
describe('Command', () => {
|
||||
|
|
|
@ -36,7 +36,7 @@ for (let i = 0; i < quantity; i++) {
|
|||
username: createString('abcdefghijklmnopqrstuvwxyz0123456789', 10),
|
||||
squadId: squadId,
|
||||
rankLvl: Math.floor(Math.random() * 22),
|
||||
}, function(err, user) {
|
||||
}, (err, user) => {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
} else {
|
||||
|
@ -47,7 +47,7 @@ for (let i = 0; i < quantity; i++) {
|
|||
|
||||
// If the Node process ends, close the Mongoose connection
|
||||
process.on('SIGINT', () => {
|
||||
mongoose.connection.close(function() {
|
||||
mongoose.connection.close(() => {
|
||||
console.log('Mongoose default connection disconnected through app termination');
|
||||
process.exit(0);
|
||||
});
|
||||
|
|
|
@ -8,6 +8,9 @@ let chai = require('chai');
|
|||
let chaiHttp = require('chai-http');
|
||||
let server = require('../server');
|
||||
|
||||
// chai methods
|
||||
require('chai').should();
|
||||
|
||||
chai.use(chaiHttp);
|
||||
// Our parent block
|
||||
describe('Decorations', () => {
|
||||
|
|
|
@ -8,6 +8,9 @@ let chai = require('chai');
|
|||
let chaiHttp = require('chai-http');
|
||||
let server = require('../server');
|
||||
|
||||
// chai methods
|
||||
require('chai').should();
|
||||
|
||||
chai.use(chaiHttp);
|
||||
// Our parent block
|
||||
describe('Ranks', () => {
|
||||
|
|
|
@ -8,6 +8,9 @@ let chai = require('chai');
|
|||
let chaiHttp = require('chai-http');
|
||||
let server = require('../server');
|
||||
|
||||
// chai methods
|
||||
require('chai').should();
|
||||
|
||||
chai.use(chaiHttp);
|
||||
// Our parent block
|
||||
describe('Squads', () => {
|
||||
|
|
|
@ -8,6 +8,9 @@ let chai = require('chai');
|
|||
let chaiHttp = require('chai-http');
|
||||
let server = require('../server');
|
||||
|
||||
// chai methods
|
||||
require('chai').should();
|
||||
|
||||
chai.use(chaiHttp);
|
||||
// Our parent block
|
||||
describe('Users', () => {
|
||||
|
|
|
@ -7,6 +7,9 @@ let chai = require('chai');
|
|||
let chaiHttp = require('chai-http');
|
||||
let server = require('../server');
|
||||
|
||||
// chai methods
|
||||
require('chai').should();
|
||||
|
||||
chai.use(chaiHttp);
|
||||
// Our parent block
|
||||
describe('Wars', () => {
|
||||
|
|
Loading…
Reference in New Issue