jest-json-to-tap
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "jest-json-to-tap", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Jest Json parser that outputs TAP results", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -8,6 +8,7 @@ /* | ||
const end = output.lastIndexOf('}'); | ||
const jsonOutput = output.substring(start, end + 1).replace(',,', ','); | ||
return JSON.parse(output.substring(start, end + 1)); | ||
return JSON.parse(jsonOutput); | ||
}; | ||
module.exports = parseJestJsonOutput; |
@@ -6,9 +6,10 @@ const parseJestJsonOutput = require('../src/parseJestJsonOutput'); | ||
it('must return the parsed JSON of `jest --json` output', () => { | ||
Object.keys(raw).forEach((key) => { | ||
expect(parseJestJsonOutput(raw[key])) | ||
.toEqual(expect.objectContaining({ | ||
numFailedTestSuites: expect.any(Number) | ||
})); | ||
}); | ||
Object.keys(raw) | ||
.forEach((key) => { | ||
expect(parseJestJsonOutput(raw[key])) | ||
.toEqual(expect.objectContaining({ | ||
numFailedTestSuites: expect.any(Number) | ||
})); | ||
}); | ||
}); | ||
}); |
Sorry, the diff of this file is too big to display
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
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
208329
238