Removed test/functional/module/module_spec.js

no issue

- why? this is a unit test (!)
- we start+stop Ghost in the routing tests a lot, this implicit tested
- it has no priority for now to move this test to a unit test
- this was the only module test, removed related grunt tasks
This commit is contained in:
kirrg001 2018-10-05 13:37:52 +02:00
parent 4ecf7352b5
commit f198343698
2 changed files with 1 additions and 43 deletions

View File

@ -165,13 +165,6 @@ var config = require('./core/server/config'),
]
},
// #### All Module tests
module: {
src: [
'core/test/functional/module/**/*_spec.js'
]
},
// #### Run single test (src is set dynamically, see grunt task 'test')
single: {}
},
@ -519,7 +512,7 @@ var config = require('./core/server/config'),
// `grunt test-all` will lint and test your pre-built local Ghost codebase.
//
grunt.registerTask('test-all', 'Run all server tests',
['test-routes', 'test-module', 'test-unit', 'test-integration']);
['test-routes', 'test-unit', 'test-integration']);
// ### Lint
//
@ -602,15 +595,6 @@ var config = require('./core/server/config'),
['test-setup', 'mochacli:routes']
);
// ### Module tests *(sub task)*
// `grunt test-module` will run just the module tests
//
// The purpose of the module tests is to ensure that Ghost can be used as an npm module and exposes all
// required methods to interact with it.
grunt.registerTask('test-module', 'Run functional module tests (mocha)',
['test-setup', 'mochacli:module']
);
// ### Coverage
// `grunt coverage` will generate a report for the Unit Tests.
//

View File

@ -1,26 +0,0 @@
// # 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();
});
});
});
});