Ghost/core/test/functional/module/module_spec.js
kirrg001 6f6c8f4521 Import lib/common only
refs #9178

- avoid importing 4 modules (logging, errors, events and i18n)
- simply require common in each file
2017-12-12 10:28:13 +01:00

27 lines
954 B
JavaScript

// # Module tests
// This tests using Ghost as an npm module
var should = require('should'),
testUtils = require('../../utils'),
ghost = testUtils.startGhost,
common = require('../../../server/lib/common');
common.i18n.init();
describe('Module', function () {
describe('Setup', function () {
it('expose ghost server', function () {
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();
});
});
});
});