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 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', () => {
|
||||||
|
|
|
@ -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', () => {
|
||||||
|
|
|
@ -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);
|
||||||
});
|
});
|
||||||
|
|
|
@ -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', () => {
|
||||||
|
|
|
@ -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', () => {
|
||||||
|
|
|
@ -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', () => {
|
||||||
|
|
|
@ -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', () => {
|
||||||
|
|
|
@ -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', () => {
|
||||||
|
|
Loading…
Reference in New Issue