Comparing version 2.1.0 to 2.1.1
@@ -0,1 +1,3 @@ | ||
var path = require('path'); | ||
module.exports = exports = ConsoleReporter; | ||
@@ -13,2 +15,3 @@ | ||
timer = options.timer || noopTimer, | ||
jasmineCorePath = options.jasmineCorePath, | ||
specCount, | ||
@@ -37,4 +40,8 @@ failureCount, | ||
printNewline(); | ||
printNewline(); | ||
if(failedSpecs.length > 0) { | ||
print('Failures:'); | ||
} | ||
for (var i = 0; i < failedSpecs.length; i++) { | ||
specFailureDetails(failedSpecs[i]); | ||
specFailureDetails(failedSpecs[i], i + 1); | ||
} | ||
@@ -128,4 +135,12 @@ | ||
function specFailureDetails(result) { | ||
function filterStack(stack) { | ||
var filteredStack = stack.split('\n').filter(function(stackLine) { | ||
return stackLine.indexOf(jasmineCorePath) === -1; | ||
}).join('\n'); | ||
return filteredStack; | ||
} | ||
function specFailureDetails(result, failedSpecNumber) { | ||
printNewline(); | ||
print(failedSpecNumber + ') '); | ||
print(result.fullName); | ||
@@ -136,4 +151,9 @@ | ||
printNewline(); | ||
print(indent(failedExpectation.message, 2)); | ||
print(indent(failedExpectation.stack, 2)); | ||
print(indent('Message:', 2)); | ||
printNewline(); | ||
print(colored('red', indent(failedExpectation.message, 4))); | ||
printNewline(); | ||
print(indent('Stack:', 2)); | ||
printNewline(); | ||
print(indent(filterStack(failedExpectation.stack), 4)); | ||
} | ||
@@ -140,0 +160,0 @@ |
@@ -11,2 +11,3 @@ var path = require('path'), | ||
var jasmineCore = options.jasmineCore || require('jasmine-core'); | ||
this.jasmineCorePath = path.join(jasmineCore.files.path, 'jasmine.js'); | ||
this.jasmine = jasmineCore.boot(jasmineCore); | ||
@@ -38,3 +39,3 @@ this.projectBaseDir = options.projectBaseDir || path.resolve(); | ||
options.timer = new this.jasmine.Timer(); | ||
options.timer = options.timer || new this.jasmine.Timer(); | ||
options.print = options.print || function() { | ||
@@ -45,2 +46,3 @@ process.stdout.write(util.format.apply(this, arguments)); | ||
options.onComplete = options.onComplete || defaultOnComplete; | ||
options.jasmineCorePath = options.jasmineCorePath || this.jasmineCorePath; | ||
@@ -47,0 +49,0 @@ var consoleReporter = new module.exports.ConsoleReporter(options); |
@@ -11,3 +11,3 @@ { | ||
], | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"repository": { | ||
@@ -14,0 +14,0 @@ "type": "git", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
52925
22
437
0
48