2014-09-27 21:26:26 +04:00
|
|
|
// # Module tests
|
|
|
|
// This tests using Ghost as an npm module
|
2017-03-21 11:24:11 +03:00
|
|
|
var should = require('should'),
|
|
|
|
testUtils = require('../../utils'),
|
|
|
|
ghost = testUtils.startGhost,
|
2017-12-12 00:47:46 +03:00
|
|
|
common = require('../../../server/lib/common');
|
2016-09-12 14:53:04 +03:00
|
|
|
|
2017-12-12 00:47:46 +03:00
|
|
|
common.i18n.init();
|
2014-09-27 21:26:26 +04:00
|
|
|
|
|
|
|
describe('Module', function () {
|
|
|
|
describe('Setup', function () {
|
2017-12-06 15:03:21 +03:00
|
|
|
it('expose ghost server', function () {
|
2017-11-29 14:48:05 +03:00
|
|
|
return ghost()
|
|
|
|
.then(function (ghostServer) {
|
|
|
|
should.exist(ghostServer);
|
|
|
|
should.exist(ghostServer.rootApp);
|
|
|
|
should.exist(ghostServer.config);
|
|
|
|
should.exist(ghostServer.config.get('server'));
|
|
|
|
should.exist(ghostServer.config.get('paths'));
|
|
|
|
ghostServer.start.should.be.a.Function();
|
|
|
|
ghostServer.restart.should.be.a.Function();
|
|
|
|
ghostServer.stop.should.be.a.Function();
|
|
|
|
});
|
2014-09-27 21:26:26 +04:00
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|