Skip to content

Commit

Permalink
Add coverage npm script via istanbul
Browse files Browse the repository at this point in the history
Add istanbul for test coverage reporting.
  • Loading branch information
jimf committed Feb 19, 2016
1 parent 2399fd3 commit 2ff6f12
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
/bower_components/
/dist/gh-pages/
/tmp-test-bundle.js
/coverage/
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@
"bench": "scripts/benchRunner",
"bookmarklet": "scripts/bookmarklet",
"build": "make && make dist/ramda.min.js",
"clean": "rimraf dist/*",
"clean": "rimraf dist/* coverage/*",
"precoverage": "npm run pretest",
"coverage": "istanbul cover node_modules/.bin/_mocha -- --reporter spec",
"postcoverage": "npm run posttest",
"lint": "eslint scripts/bookmarklet scripts/build src/*.js src/internal/*.js test/*.js test/**/*.js lib/sauce/*.js lib/bench/*.js",
"pretest": "npm install && npm run lint && npm run clean && npm run build",
"test": "mocha --reporter spec",
Expand All @@ -57,6 +60,7 @@
"escodegen": "1.4.x",
"eslint": "^1.10.1",
"handlebars": "3.0.x",
"istanbul": "^0.4.x",
"js-yaml": "^3.2.5",
"mocha": "2.x.x",
"q": "^1.1.1",
Expand Down
1 change: 1 addition & 0 deletions test/flatten.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ describe('flatten', function() {
});

it('handles ridiculously large inputs', function() {
this.timeout(10000);
eq(R.flatten([new Array(1000000), R.range(0, 56000), 5, 1, 3]).length, 1056003);
});

Expand Down

0 comments on commit 2ff6f12

Please sign in to comment.