Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: use nyc instead of istanbul #11532

Merged
merged 2 commits into from Mar 22, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -16,3 +16,4 @@ versions.json
/.vscode
.sublimelinterrc
.eslint-release-info.json
.nyc_output
12 changes: 12 additions & 0 deletions .nycrc
@@ -0,0 +1,12 @@
{
"include": [
"bin/**/*.js",
"conf/**/*.js",
"lib/**/*.js"
],
"reporter": [
"lcov",
"text-summary"
],
"sourceMap": true
}
12 changes: 3 additions & 9 deletions Makefile.js
Expand Up @@ -84,12 +84,7 @@ const NODE = "node ", // intentional extra space
* @private
*/
function getTestFilePatterns() {
return ls("tests/lib/").filter(pathToCheck => test("-d", `tests/lib/${pathToCheck}`)).reduce((initialValue, currentValues) => {
if (currentValues !== "rules") {
initialValue.push(`"tests/lib/${currentValues}/**/*.js"`);
}
return initialValue;
}, ["\"tests/lib/rules/**/*.js\"", "\"tests/lib/*.js\"", "\"tests/bin/**/*.js\"", "\"tests/tools/**/*.js\""]).join(" ");
return ["\"tests/lib/**/*.js\"", "\"tests/bin/**/*.js\"", "\"tests/tools/**/*.js\""].join(" ");
mysticatea marked this conversation as resolved.
Show resolved Hide resolved
mysticatea marked this conversation as resolved.
Show resolved Hide resolved
}

/**
Expand Down Expand Up @@ -567,13 +562,12 @@ target.test = function() {

echo("Running unit tests");

lastReturn = exec(`${getBinFile("istanbul")} cover ${MOCHA} -- -R progress -t ${MOCHA_TIMEOUT} -c ${TEST_FILES}`);
lastReturn = exec(`${getBinFile("nyc")} -- ${MOCHA} -R progress -t ${MOCHA_TIMEOUT} -c ${TEST_FILES}`);
if (lastReturn.code !== 0) {
errors++;
}

lastReturn = exec(`${getBinFile("istanbul")} check-coverage --statement 99 --branch 98 --function 99 --lines 99`);

lastReturn = exec(`${getBinFile("nyc")} check-coverage --statement 99 --branch 98 --function 99 --lines 99`);
if (lastReturn.code !== 0) {
errors++;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -92,7 +92,6 @@
"eslint-release": "^1.2.0",
"eslump": "^2.0.0",
"esprima": "^4.0.1",
"istanbul": "^0.4.5",
"jsdoc": "^3.5.5",
"karma": "^3.1.4",
"karma-chrome-launcher": "^2.2.0",
Expand All @@ -105,6 +104,7 @@
"mocha": "^5.0.5",
"mock-fs": "^4.8.0",
"npm-license": "^0.3.3",
"nyc": "^13.3.0",
"proxyquire": "^2.0.1",
"puppeteer": "^1.12.2",
"shelljs": "^0.8.2",
Expand Down