Skip to content

Commit 97f283e

Browse files
committed
🐛 find sizzle correctly
1 parent aec8634 commit 97f283e

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

bin/css-coverage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ if (!commander.ignoreSourceMap && /sourceMappingURL=([^\ ]*)/.exec(CSS_STR)) {
9292
var phantomCSSJSON = JSON.stringify(cssForPhantom);
9393

9494
var coverageOutput = [];
95-
var program = phantomjs.exec(path.resolve(__dirname, '../phantom-coverage.js'), path.resolve(__dirname, '..'), commander.html, phantomCSSJSON);
95+
var program = phantomjs.exec(path.resolve(__dirname, '../phantom-coverage.js'), require.resolve('sizzle'), commander.html, phantomCSSJSON);
9696
program.stderr.pipe(process.stderr);
9797
if (commander.verbose) {
9898
program.stdout.pipe(process.stderr);

phantom-coverage.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@ var system = require('system');
33
// var fs = require('fs');
44
var page = require('webpage').create();
55

6-
var rootPath = system.args[1];
6+
var sizzlePath = system.args[1];
77
var htmlPath = system.args[2];
88
var cssJSON = system.args[3];
99

10-
var sizzlePath = rootPath + '/node_modules/sizzle/dist/sizzle.js';
11-
12-
1310
// redirect all `console.log` messages to stdout because the LCOV file will be sent to stdout
1411
page.onConsoleMessage = function(msg) {
1512
// console.log.apply(console.log, arguments);

0 commit comments

Comments
 (0)