mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-30 14:22:07 +03:00
8fd272476b
closes #6505 -Removed all of the /*jshint expr:true*/ comments from the tests -Removed all of the should.equal(true, true) statements from the tests -Removed should from the greenkeeper ignores
54 lines
1.7 KiB
JavaScript
54 lines
1.7 KiB
JavaScript
/*global describe, it */
|
|
// # Module tests
|
|
// This tests using Ghost as an npm module
|
|
var should = require('should'),
|
|
|
|
ghost = require('../../../../core'),
|
|
i18n = require('../../../../core/server/i18n');
|
|
i18n.init();
|
|
|
|
describe('Module', function () {
|
|
describe('Setup', function () {
|
|
it('should resolve with a ghost-server instance', function (done) {
|
|
ghost().then(function (ghostServer) {
|
|
should.exist(ghostServer);
|
|
|
|
done();
|
|
}).catch(done);
|
|
});
|
|
|
|
it('should expose an express instance', function (done) {
|
|
ghost().then(function (ghostServer) {
|
|
should.exist(ghostServer);
|
|
should.exist(ghostServer.rootApp);
|
|
|
|
done();
|
|
}).catch(done);
|
|
});
|
|
|
|
it('should expose configuration values', function (done) {
|
|
ghost().then(function (ghostServer) {
|
|
should.exist(ghostServer);
|
|
should.exist(ghostServer.config);
|
|
should.exist(ghostServer.config.server);
|
|
should.exist(ghostServer.config.paths);
|
|
should.exist(ghostServer.config.paths.subdir);
|
|
should.equal(ghostServer.config.paths.subdir, '');
|
|
|
|
done();
|
|
}).catch(done);
|
|
});
|
|
|
|
it('should have start/stop/restart functions', function (done) {
|
|
ghost().then(function (ghostServer) {
|
|
should.exist(ghostServer);
|
|
ghostServer.start.should.be.a.Function();
|
|
ghostServer.restart.should.be.a.Function();
|
|
ghostServer.stop.should.be.a.Function();
|
|
|
|
done();
|
|
}).catch(done);
|
|
});
|
|
});
|
|
});
|