Skip to content

Commit

Permalink
test: Add tests to get back to 100% coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
nwoltman committed Oct 25, 2019
1 parent bba68db commit 8fa4781
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 12 deletions.
15 changes: 14 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,18 @@
"object-shorthand": 0,
"padded-blocks": 0,
"prefer-arrow-callback": 0
}
},
"overrides": [
{
"files": ["test/*.js"],
"env": {
"mocha": true
},
"rules": {
"brace-style": 0,
"max-len": 0,
"max-nested-callbacks": 0
}
}
]
}
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@
"eslintIgnore": [
"coverage/"
],
"nyc": {
"reporter": ["html", "text-summary"],
"check-coverage": true,
"branches": 100,
"lines": 100,
"statements": 100
},
"devDependencies": {
"@nwoltman/eslint-config": "^0.4.0",
"coveralls": "^3.0.7",
Expand All @@ -37,7 +44,7 @@
},
"scripts": {
"lint": "eslint .",
"test": "eslint . && nyc --reporter=html --reporter=text-summary mocha",
"test": "eslint . && nyc mocha",
"coveralls": "nyc report --reporter=text-lcov | coveralls"
}
}
10 changes: 0 additions & 10 deletions test/.eslintrc.json

This file was deleted.

4 changes: 4 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ describe('naturalCompare() and naturalCompare.caseInsensitive()', function() {
['a00', '<', 'a000'],
['a 0 a', '<', 'a 0 b'],
['a 0 a', '<', 'a 00 b'],
['a00', '<', 'a0a'],
['a0000', '<', 'a0a'],
['a0a', '>', 'a00'],
['a0a', '>', 'a000'],
['a0a', '<', 'a0b'],
['a0a', '<', 'a00b'],
].forEach(verify);
Expand Down

0 comments on commit 8fa4781

Please sign in to comment.