karma-json-result-reporter
Advanced tools
Comparing version 0.3.0 to 0.4.0
{ | ||
"name": "karma-json-result-reporter", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "test results as json file", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -25,2 +25,4 @@ var funMap = require('fun-map'); | ||
testResult.noExpectations = result.success && result.executedExpectationsCount === 0; | ||
return testResult; | ||
@@ -27,0 +29,0 @@ } |
@@ -70,3 +70,47 @@ var converter = require('./../resultConverter.js'); | ||
describe("noExpectations flag", function() { | ||
it("should be true only if test passed and no expectations was executed", function() { | ||
var result = { | ||
executedExpectationsCount: 0, | ||
success: true | ||
}; | ||
var output = converter.simplifyResult(result); | ||
expect(output.noExpectations).toBe(true); | ||
}); | ||
it("should be false if test passed and one expectations was executed", function() { | ||
var result = { | ||
executedExpectationsCount: 1, | ||
success: true | ||
}; | ||
var output = converter.simplifyResult(result); | ||
expect(output.noExpectations).toBe(false); | ||
}); | ||
it("should be false if test failed", function() { | ||
var result = { | ||
executedExpectationsCount: 0, | ||
success: false | ||
}; | ||
var output = converter.simplifyResult(result); | ||
expect(output.noExpectations).toBe(false); | ||
}); | ||
it("should be false if executedExpectationsCount is not defined in result", function() { | ||
var result = { | ||
success: true | ||
}; | ||
var output = converter.simplifyResult(result); | ||
expect(output.noExpectations).toBe(false); | ||
}); | ||
}); | ||
}); | ||
describe("reduceToObject", function() { | ||
@@ -103,2 +147,2 @@ | ||
}); | ||
}); |
9728
228