-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate istanbul for test coverage
- Loading branch information
1 parent
6d55e4a
commit 7c9795b
Showing
5 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ | |
/examples/example-list.xml | ||
/node_modules/ | ||
/dist/ | ||
/src_instrumented/ | ||
/coverage/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module.exports = { | ||
afterEnd: function(runner) { | ||
var fs = require('fs'); | ||
var coverage = runner.page.evaluate(function() { | ||
return window.__coverage__; | ||
}); | ||
|
||
if (coverage) { | ||
console.log('Writing coverage to coverage/coverage.json'); | ||
fs.write('coverage/coverage.json', JSON.stringify(coverage), 'w'); | ||
} else { | ||
console.log('No coverage data generated'); | ||
} | ||
} | ||
}; |