ensure app is booted before integration tests
This commit is contained in:
parent
8deec2e89a
commit
17bd101691
|
@ -11,6 +11,12 @@ var CURRENT_USER = {email: 'current@test.test', password: 'test'};
|
||||||
var debug = require('debug')('loopback:test:access-control.integration');
|
var debug = require('debug')('loopback:test:access-control.integration');
|
||||||
|
|
||||||
describe('access control - integration', function() {
|
describe('access control - integration', function() {
|
||||||
|
before(function(done) {
|
||||||
|
if (app.booting) {
|
||||||
|
return app.once('booted', done);
|
||||||
|
}
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
lt.beforeEach.withApp(app);
|
lt.beforeEach.withApp(app);
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,12 @@ var debug = require('debug')('loopback:test:relations.integration');
|
||||||
var async = require('async');
|
var async = require('async');
|
||||||
|
|
||||||
describe('relations - integration', function() {
|
describe('relations - integration', function() {
|
||||||
|
before(function(done) {
|
||||||
|
if (app.booting) {
|
||||||
|
return app.once('booted', done);
|
||||||
|
}
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
lt.beforeEach.withApp(app);
|
lt.beforeEach.withApp(app);
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,12 @@ var app = require(path.join(SIMPLE_APP, 'server/server.js'));
|
||||||
var assert = require('assert');
|
var assert = require('assert');
|
||||||
|
|
||||||
describe('remoting - integration', function() {
|
describe('remoting - integration', function() {
|
||||||
|
before(function(done) {
|
||||||
|
if (app.booting) {
|
||||||
|
return app.once('booted', done);
|
||||||
|
}
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
lt.beforeEach.withApp(app);
|
lt.beforeEach.withApp(app);
|
||||||
lt.beforeEach.givenModel('store');
|
lt.beforeEach.givenModel('store');
|
||||||
|
|
|
@ -7,6 +7,12 @@ var app = require(path.join(SIMPLE_APP, 'server/server.js'));
|
||||||
var expect = require('chai').expect;
|
var expect = require('chai').expect;
|
||||||
|
|
||||||
describe('users - integration', function() {
|
describe('users - integration', function() {
|
||||||
|
before(function(done) {
|
||||||
|
if (app.booting) {
|
||||||
|
return app.once('booted', done);
|
||||||
|
}
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
lt.beforeEach.withApp(app);
|
lt.beforeEach.withApp(app);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue