Pass in the current distribution when running node specs

- npm package spec can use beforeAll/afterAll now
- also depend on github repo directly instead of the tarball

[finish #80505862]
This commit is contained in:
slackersoft
2014-10-11 14:54:08 -07:00
parent 916dc03d9c
commit a76d6d1cd4
3 changed files with 25 additions and 18 deletions

View File

@@ -37,13 +37,19 @@ module.exports = function(grunt) {
grunt.registerTask("execSpecsInNode",
"Run Jasmine core specs in Node.js",
function() {
var done = this.async();
require("shelljs").exec("node_modules/.bin/jasmine", function(exitCode) {
if (exitCode !== 0) {
grunt.fail.fatal("Specs Failed", exitCode);
var done = this.async(),
Jasmine = require('jasmine'),
jasmineCore = require('./lib/jasmine-core.js'),
jasmine = new Jasmine({jasmineCore: jasmineCore});
jasmine.loadConfigFile('./spec/support/jasmine.json');
jasmine.configureDefaultReporter({
onComplete: function(passed) {
done(passed);
}
done();
});
jasmine.execute();
}
);