Skip to content

Commit

Permalink
Upgrade development dependencies (#88)
Browse files Browse the repository at this point in the history
* Use nyc to replace blanket for code coverage

* Upgrade to mocha@3 and phantomjs-prebuild@2

This also solves an issue on macOS Sierra where Phantom@1 was segfaulting

* Adjust a test to check for exception rather than exact value
  • Loading branch information
Thomas Parisot committed Feb 13, 2017
1 parent 6b88ce2 commit fa633a7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 21 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@ results
node_modules
bower_components
npm-debug.log
.nyc_output
coverage*

.idea
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ install:
- rm rules.json
- npm install --tldjs-update-rules

script:
- xvfb-run -a npm test
- npm run test-coverage
script: xvfb-run -a npm test

deploy:
provider: npm
Expand Down
26 changes: 11 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@
"license": "MIT",
"scripts": {
"lint": "jshint --config .jshintrc lib/**/*.js",
"test": "mocha -R dot -r env-test",
"test": "nyc mocha -R dot -r env-test",
"posttest": "npm run lint && npm run test-browser",
"test-coverage": "mocha -R travis-cov -r blanket -r env-test",
"coverage": "npm run test-coverage -- > coverage.html",
"test-watch": "mocha -R dot -r env-test --watch",
"test-browser": "testling",
"update": "node ./bin/update.js",
Expand All @@ -34,13 +32,12 @@
"publicsuffix-org": "https://publicsuffix.org/list/effective_tld_names.dat"
}
},
"config": {
"blanket": {
"pattern": "tld.js/lib/"
},
"travis-cov": {
"threshold": 97
}
"nyc": {
"check-coverage": true,
"reporter": [
"text",
"html"
]
},
"testling": {
"files": "test/*.js",
Expand All @@ -59,15 +56,14 @@
"punycode": "^1.4.1"
},
"devDependencies": {
"blanket": "1.1.9",
"env-test": "^1.0.0",
"expect.js": "^0.3.1",
"github-changes": "^1.0.0",
"jshint": "^2.5.1",
"mocha": "^2.3.3",
"phantomjs": "^1.9.18",
"testling": "^1.7.0",
"travis-cov": "^0.2.5"
"mocha": "^3.2.0",
"nyc": "^10.1.2",
"phantomjs-prebuilt": "^2.1.7",
"testling": "^1.7.0"
},
"keywords": [
"tld",
Expand Down
2 changes: 1 addition & 1 deletion test/tld.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ describe('tld.js', function () {
});

it('should return the suffix if a rule exists that has no exceptions', function(){
expect(tld.rules.eu).to.be('mycd');
expect(tld.rules.eu).to.not.contain('!');
expect(tld.getPublicSuffix('microsoft.eu')).to.be('eu');
});

Expand Down

0 comments on commit fa633a7

Please sign in to comment.