Skip to content

Commit

Permalink
fixed tests, switched to nyc for coverage, fixed security issue, adde…
Browse files Browse the repository at this point in the history
…d Lin as collaborator
  • Loading branch information
Benjamin Coe committed May 16, 2015
1 parent 97e94cb commit 0291360
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 21 deletions.
1 change: 0 additions & 1 deletion .coveralls.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -2,3 +2,5 @@
node_modules/
*.swp
test.js
coverage
nyc_output
4 changes: 3 additions & 1 deletion .travis.yml
Expand Up @@ -4,4 +4,6 @@ node_js:
- "0.11"
- "0.12"
- "iojs"
after_script: "NODE_ENV=test YOURPACKAGE_COVERAGE=1 ./node_modules/.bin/mocha --require patched-blanket --reporter mocha-lcov-reporter | ./node_modules/coveralls/bin/coveralls.js"
after_success: npm run coverage
env:
- secure: "U5owYv3F2kT6FdxOhWltfpJbHe3CFxNqDyToDOGyA6a9cyKZQe8LQhBJTFxT606nfWaRuxRrRQ1+/tl4rDMjX3PwzR0MTaE/6cIItqe8jra7M3y7u9fBhM5WRWHs7MOVAeXkacZZ3oha6VugoZaQZQNT5myI3BhsvZKmn8JlciY="
2 changes: 1 addition & 1 deletion lib/usage.js
Expand Up @@ -106,7 +106,7 @@ module.exports = function (yargs) {
),
ui = cliui({
width: wrap,
wrap: wrap ? true : false
wrap: !!wrap
})

// the usage string.
Expand Down
22 changes: 6 additions & 16 deletions package.json
Expand Up @@ -20,31 +20,17 @@
"coveralls": "^2.11.2",
"hashish": "0.0.4",
"mocha": "^2.2.1",
"mocha-lcov-reporter": "0.0.2",
"mocoverage": "^1.0.0",
"patched-blanket": "^1.0.1",
"standard": "^3.6.0"
},
"scripts": {
"test": "standard && mocha --check-leaks --ui exports --require patched-blanket -R mocoverage"
"test": "standard && nyc mocha --check-leaks && nyc report",
"coverage": "nyc report --reporter=text-lcov | coveralls"
},
"repository": {
"type": "git",
"url": "http://github.com/bcoe/yargs.git"
},
"config": {
"blanket": {
"pattern": [
"lib",
"index.js"
],
"data-cover-never": [
"node_modules",
"test"
],
"output-reporter": "spec"
}
},
"standard": {
"ignore": [
"**/example/**"
Expand Down Expand Up @@ -86,6 +72,10 @@
{
"name": "Benjamin Horsleben",
"url": "https://github.com/fizker"
},
{
"name": "Lin Clark",
"url": "https://github.com/linclark"
}
],
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions test/parser.js
Expand Up @@ -956,8 +956,8 @@ describe('parser tests', function () {

it('should raise an exception if there are not enough arguments following key', function () {
expect(function () {
yargs().nargs('foo', 2).
parse([ '--foo', 'apple'])
yargs().nargs('foo', 2)
.parse([ '--foo', 'apple'])
}).to.throw('not enough arguments following: foo')
})

Expand Down

0 comments on commit 0291360

Please sign in to comment.