Skip to content

Commit

Permalink
Update from deprecated Istanbul to NYC to fix code coverage
Browse files Browse the repository at this point in the history
- Update to latest version of Fabricator
- Change unit tests and main entry point to use source file instead
  • Loading branch information
nitro404 committed Mar 20, 2020
1 parent 242d442 commit ec44f1b
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 54 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
node_modules
bower_components
coverage
.nyc_output
.sass-cache
.coveralls.yml
yarn.lock
Expand Down
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
node_modules
bower_components
src
dist
test
coverage
docs
.nyc_output
.sass-cache
.coveralls.yml
.travis.yml
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ node_js:

before_install:
- npm cache clean --force
- npm install -g mocha istanbul coveralls
- npm install -g mocha nyc coveralls

after_success:
- npm run coveralls
Expand Down
144 changes: 99 additions & 45 deletions package-lock.json

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

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "extra-utilities",
"version": "1.3.4",
"version": "1.3.5",
"description": "A collection of useful helper functions.",
"main": "dist/extra-utilities.js",
"main": "src/extra-utilities.js",
"scripts": {
"build": "gulp build",
"lint": "gulp lint",
"test": "mocha",
"coverage": "istanbul cover node_modules/mocha/bin/_mocha --require test/**/*.js",
"coveralls": "npm run coverage -- --report lcovonly && cat ./coverage/lcov.info | coveralls"
"coverage": "nyc npm run test",
"coveralls": "nyc report --reporter=text-lcov | coveralls"
},
"repository": {
"type": "git",
Expand All @@ -35,6 +35,6 @@
},
"devDependencies": {
"chai": "^4.2.0",
"gulp-fabricator": "^1.1.0"
"gulp-fabricator": "^1.2.0"
}
}
2 changes: 1 addition & 1 deletion src/extra-utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -2315,4 +2315,4 @@ utilities.compareVersions = function compareVersions(v1, v2, caseSensitive, thro
}
};

return utilities;
module.exports = utilities;
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
global.validator = undefined;
global.changeCase = undefined;

const utilities = require("../dist/extra-utilities.js");
const utilities = require("../src/extra-utilities.js");
const chai = require("chai");
const expect = chai.expect;

Expand Down

0 comments on commit ec44f1b

Please sign in to comment.