jasmine
Advanced tools
Comparing version 3.2.0 to 3.3.0
@@ -158,7 +158,22 @@ var path = require('path'), | ||
var includeFiles = []; | ||
var excludeFiles = []; | ||
files.forEach(function(file) { | ||
if (file.startsWith('!')) { | ||
var excludeFile = file.substring(1); | ||
if(!(path.isAbsolute && path.isAbsolute(excludeFile))) { | ||
excludeFile = path.join(jasmineRunner.projectBaseDir, jasmineRunner.specDir, excludeFile); | ||
} | ||
excludeFiles.push(excludeFile); | ||
} else { | ||
includeFiles.push(file); | ||
} | ||
}); | ||
includeFiles.forEach(function(file) { | ||
if(!(path.isAbsolute && path.isAbsolute(file))) { | ||
file = path.join(jasmineRunner.projectBaseDir, jasmineRunner.specDir, file); | ||
} | ||
var filePaths = glob.sync(file); | ||
var filePaths = glob.sync(file, { ignore: excludeFiles }); | ||
filePaths.forEach(function(filePath) { | ||
@@ -186,8 +201,19 @@ if(fileArr.indexOf(filePath) === -1) { | ||
Jasmine.prototype.exitCodeCompletion = function(passed) { | ||
if(passed) { | ||
this.exit(0); | ||
var jasmineRunner = this; | ||
var streams = [process.stdout, process.stderr]; | ||
var writesToWait = streams.length; | ||
streams.forEach(function(stream) { | ||
stream.write('', exitIfAllStreamsCompleted); | ||
}); | ||
function exitIfAllStreamsCompleted() { | ||
writesToWait--; | ||
if (writesToWait === 0) { | ||
if(passed) { | ||
jasmineRunner.exit(0); | ||
} | ||
else { | ||
jasmineRunner.exit(1); | ||
} | ||
} | ||
} | ||
else { | ||
this.exit(1); | ||
} | ||
}; | ||
@@ -194,0 +220,0 @@ |
@@ -12,3 +12,3 @@ { | ||
"license": "MIT", | ||
"version": "3.2.0", | ||
"version": "3.3.0", | ||
"repository": { | ||
@@ -23,3 +23,3 @@ "type": "git", | ||
"glob": "^7.0.6", | ||
"jasmine-core": "~3.2.0" | ||
"jasmine-core": "~3.3.0" | ||
}, | ||
@@ -26,0 +26,0 @@ "bin": "./bin/jasmine.js", |
28641
758
+ Addedjasmine-core@3.3.0(transitive)
- Removedjasmine-core@3.2.1(transitive)
Updatedjasmine-core@~3.3.0