Skip to content

Commit

Permalink
Use codecov to monitor code coverage (#1408)
Browse files Browse the repository at this point in the history
  • Loading branch information
harrysarson authored and josdejong committed Feb 16, 2019
1 parent 38a6d78 commit 64de7e7
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 30 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Expand Up @@ -21,7 +21,9 @@ jobs:
- script: npm run build && npm run test:dist
node_js: lts/*
name: Bundling Test

- script: npm run coverage && npx codecov
node_js: lts/*
name: Coverage
git:
depth: 5

Expand Down
107 changes: 79 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -125,6 +125,7 @@
"@babel/register": "7.0.0",
"babel-loader": "8.0.5",
"benchmark": "2.1.4",
"codecov": "3.2.0",
"expr-eval": "1.2.2",
"glob": "7.1.3",
"gulp": "4.0.0",
Expand Down Expand Up @@ -181,7 +182,7 @@
"test:dist": "mocha test-dist --recursive",
"test:browser": "karma start ./browser-test-config/local-karma.js",
"test:browserstack": "karma start ./browser-test-config/browserstack-karma.js",
"coverage": "nyc --reporter=lcov --reporter=text-summary mocha test test-node --recursive --require @babel/register; echo \"\nDetailed coverage report is available at ./coverage/lcov-report/index.html\"",
"coverage": "nyc --reporter=lcov --reporter=text-summary mocha test test-node --recursive --require @babel/register && echo \"\nDetailed coverage report is available at ./coverage/lcov-report/index.html\"",
"prepublishOnly": "npm run build-and-test"
},
"bin": {
Expand Down
1 change: 1 addition & 0 deletions test/expression/Help.test.js
Expand Up @@ -30,6 +30,7 @@ describe('help', function () {
})

it('should throw an error when constructed without new operator', function () {
this.timeout(10000)
assert.throws(function () {
console.log(Help(math.expression.docs.sin))
}, /Constructor must be called with the new operator/)
Expand Down

0 comments on commit 64de7e7

Please sign in to comment.