Integrate istanbul for test coverage

This commit is contained in:
Bart van den Eijnden
2015-04-01 12:08:14 +02:00
committed by Marc Jansen
parent 6d55e4aa99
commit 7c9795ba35
5 changed files with 27 additions and 1 deletions

View File

@@ -60,6 +60,11 @@ serve.createServer(function(err, server) {
url + '/test/index.html'
];
if (process.argv.length > 2 && process.argv[2] === 'istanbul') {
args.push('spec', '{"hooks": "' +
path.join(__dirname, '../test/phantom_hooks.js') + '"}');
}
var child = spawn(phantomjs.path, args, {stdio: 'inherit'});
child.on('exit', function(code) {
process.exit(code);