Merge pull request #5416 from jaswilli/fixup-test

Make sure done() is called from before hooks
This commit is contained in:
Hannah Wolfe 2015-06-10 09:19:50 +01:00
commit 9071d7a749
10 changed files with 13 additions and 45 deletions

View File

@ -13,9 +13,7 @@ describe('Module', function () {
should.exist(ghostServer);
done();
}).catch(function (e) {
done(e);
});
}).catch(done);
});
it('should expose an express instance', function (done) {
@ -24,9 +22,7 @@ describe('Module', function () {
should.exist(ghostServer.rootApp);
done();
}).catch(function (e) {
done(e);
});
}).catch(done);
});
it('should expose configuration values', function (done) {
@ -39,9 +35,7 @@ describe('Module', function () {
should.equal(ghostServer.config.paths.subdir, '');
done();
}).catch(function (e) {
done(e);
});
}).catch(done);
});
it('should have start/stop/restart functions', function (done) {
@ -52,9 +46,7 @@ describe('Module', function () {
ghostServer.stop.should.be.a.Function;
done();
}).catch(function (e) {
done(e);
});
}).catch(done);
});
});
});

View File

@ -20,10 +20,7 @@ describe('Authentication API', function () {
}).then(function (token) {
accesstoken = token;
done();
}).catch(function (e) {
console.log('Ghost Error: ', e);
console.log(e.stack);
});
}).catch(done);
});
after(function (done) {

View File

@ -19,10 +19,7 @@ describe('DB API', function () {
}).then(function (token) {
accesstoken = token;
done();
}).catch(function (e) {
console.log('Ghost Error: ', e);
console.log(e.stack);
});
}).catch(done);
});
after(function (done) {

View File

@ -18,7 +18,7 @@ describe('Unauthorized', function () {
request = supertest.agent(ghostServer.rootApp);
done();
});
}).catch(done);
});
after(function (done) {

View File

@ -20,10 +20,7 @@ describe('Notifications API', function () {
}).then(function (token) {
accesstoken = token;
done();
}).catch(function (e) {
console.log('Ghost Error: ', e);
console.log(e.stack);
});
}).catch(done);
});
after(function (done) {

View File

@ -22,10 +22,7 @@ describe('Post API', function () {
}).then(function (token) {
accesstoken = token;
done();
}).catch(function (e) {
console.log('Ghost Error: ', e);
console.log(e.stack);
});
}).catch(done);
});
after(function (done) {

View File

@ -21,10 +21,7 @@ describe('Settings API', function () {
}).then(function (token) {
accesstoken = token;
done();
}).catch(function (e) {
console.log('Ghost Error: ', e);
console.log(e.stack);
});
}).catch(done);
});
after(function (done) {

View File

@ -21,10 +21,7 @@ describe('Slug API', function () {
}).then(function (token) {
accesstoken = token;
done();
}).catch(function (e) {
console.log('Ghost Error: ', e);
console.log(e.stack);
});
}).catch(done);
});
after(function (done) {

View File

@ -21,10 +21,7 @@ describe('Tag API', function () {
}).then(function (token) {
accesstoken = token;
done();
}).catch(function (e) {
console.log('Ghost Error: ', e);
console.log(e.stack);
});
}).catch(done);
});
after(function (done) {

View File

@ -21,10 +21,7 @@ describe('User API', function () {
}).then(function (token) {
accesstoken = token;
done();
}).catch(function (e) {
console.log('Ghost Error: ', e);
console.log(e.stack);
});
}).catch(done);
});
after(function (done) {