jasmine-node
Advanced tools
Comparing version 1.0.8 to 1.0.9
@@ -16,2 +16,9 @@ var jasmine = require('./index'); | ||
var junitreport = { | ||
report: false, | ||
savePath : "./reports/", | ||
useDotNotation: true, | ||
consolidate: true | ||
} | ||
var args = process.argv.slice(2); | ||
@@ -50,2 +57,5 @@ | ||
break; | ||
case '--junitreport': | ||
junitreport.report = true; | ||
break; | ||
default: | ||
@@ -79,3 +89,3 @@ if (arg.match(/^--/)) help(); | ||
} | ||
}, isVerbose, showColors, new RegExp(match + "spec\\.(" + extentions + ")$", 'i')); | ||
}, isVerbose, showColors, new RegExp(match + "spec\\.(" + extentions + ")$", 'i'), junitreport); | ||
@@ -93,2 +103,3 @@ function help(){ | ||
, ' --coffee - load coffee-script which allows execution .coffee files' | ||
, ' --junitreport - export tests results as junitreport xml format' | ||
, '' | ||
@@ -95,0 +106,0 @@ ].join("\n")); |
@@ -6,3 +6,3 @@ | ||
var filename = __dirname + '/jasmine-1.0.1.js'; | ||
var filename = __dirname + '/jasmine-2.0.0.rc1.js'; | ||
global.window = { | ||
@@ -61,3 +61,3 @@ setTimeout: setTimeout, | ||
jasmine.executeSpecsInFolder = function(folder, done, isVerbose, showColors, matcher) { | ||
jasmine.executeSpecsInFolder = function(folder, done, isVerbose, showColors, matcher, junitreport){ | ||
var fileMatcher = matcher || new RegExp(".(js)$", "i"); | ||
@@ -79,7 +79,18 @@ var colors = showColors || false; | ||
var jasmineEnv = jasmine.getEnv(); | ||
jasmineEnv.reporter = new TerminalReporter({print: sys.print, | ||
if(junitreport.report) { | ||
require("jasmine-reporters"); | ||
if(!path.existsSync(junitreport.savePath)) { | ||
sys.puts('creating junit xml report save path: ' + junitreport.savePath); | ||
fs.mkdirSync(junitreport.savePath, "0755"); | ||
} | ||
jasmineEnv.addReporter(new jasmine.JUnitXmlReporter(junitreport.savePath, junitreport.consolidate, junitreport.useDotNotation)); | ||
} | ||
jasmineEnv.addReporter(new TerminalReporter({print: sys.print, | ||
verbose: isVerbose, | ||
color: showColors, | ||
onComplete: done, | ||
stackFilter: removeJasmineFrames}); | ||
stackFilter: removeJasmineFrames}) | ||
); | ||
jasmineEnv.execute(); | ||
@@ -86,0 +97,0 @@ }; |
@@ -80,3 +80,4 @@ // | ||
spec.items_.forEach(function(result){ | ||
outerThis.log_.push(' ' + outerThis.stackFilter(result.trace.stack) + '\n'); | ||
if (!result.passed_) | ||
outerThis.log_.push(' ' + outerThis.stackFilter(result.trace.stack) + '\n'); | ||
}); | ||
@@ -83,0 +84,0 @@ } else { |
{ | ||
"name" : "jasmine-node" | ||
, "version" : "1.0.8" | ||
, "version" : "1.0.9" | ||
, "description" : "DOM-less simple JavaScript BDD testing framework for Node" | ||
@@ -19,5 +19,5 @@ , "homepage" : [ "http://pivotal.github.com/jasmine" | ||
, "licenses" : ["MIT"] | ||
, "dependencies" : { "coffee-script" : ">=1.0.1"} | ||
, "dependencies" : { "coffee-script" : ">=1.0.1", "jasmine-reporters" : "0.1.0"} | ||
, "bin" : "bin/jasmine-node" | ||
, "main" : "lib/jasmine-node" | ||
} |
@@ -33,3 +33,4 @@ jasmine-node | ||
* <code>--verbose</code>, verbose output as the specs are run | ||
* <code>--junitreport</code>, export tests results as junitreport xml format' | ||
Checkout spec/SampleSpecs.js to see how to use it. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
84424
2573
36
2
1
+ Addedjasmine-reporters@0.1.0
+ Addedjasmine-reporters@0.1.0(transitive)