Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade tap #27

Merged
merged 2 commits into from
Jun 4, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
sudo: false
language: node_js
node_js:
- '0.12'
- '0.10'
- iojs
- '0.12'
- '0.10'
- iojs
env:
- secure: "SVg7NpV0Sru296kdp+eFl07RFjtJy242fWQ1KDCUdk/1EtZEOzBoSKP7Tn3zX/VLBieexL0T31EwYvRztnL97Sr8VgpYU0z95vCPO8FrixElJR6NH3dqrKeNzC3xOYdV0fy2b4UMlPJOI0aYDT1KHm1aWtkb2J8zqII+XbMtlDaelfHCDxa2+RBII9nYYDP62z+0chQFS6MGPSNwve3G2emYHZpYP5iTFmOzaFUCAjLskKvnnsY0jyx5XssqAo17747WKZl5SDgN8YHZIwhE5tB9m9j3MGjJhwdsR3kmq2om0GD1tQFFAXzWhWad3zNBUE4fLqswgASi39o5NIEzvSRzpw77ttOkkIFGem0l421Zi25W8x5n6GZvP06Y47ddmjNBlniwIzG4fb3dbIByCy/g5SjUYmfnke7stXXBKsPv0eEadlLGFWnG5RIfnyGjvUgQ//QXSAnBBzYF9IK+KUdU8c9kHF6kPybsGEzjQoX+4EJL6kZ4sNX9qxjHERUr4Jb6rAMOnKI9VtCBNqwcCC3nV5DDWHS86hKwbuTbBFkszP7majOi0kUQJTO/tZGwVVcphSDwhL5QkmMepLOqXyRICdUcB2ffXHYhZLiZPofYdom8csaDolqFkotJEBj3GM3gwHvUC3i1vxshxtjF6NHjanhpiIpHLRCs6R1RESE="
after_success: npm run coverage
5 changes: 3 additions & 2 deletions bin/nyc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ if (process.env.NYC_CWD) {
yargs
.option('r', {
alias: 'reporter',
describe: 'coverage reporter to use',
default: 'text'
describe: 'coverage reporter(s) to use',
default: 'text',
array: true
})
.help('h')
.example('$0 report --reporter=lcov', 'output an HTML lcov report to ./coverage')
Expand Down
12 changes: 4 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function NYC (opts) {
),
tempDirectory: './.nyc_output',
cwd: process.env.NYC_CWD || process.cwd(),
reporter: 'text',
reporter: ['text'],
istanbul: require('istanbul')
}, opts)

Expand Down Expand Up @@ -113,13 +113,9 @@ NYC.prototype.report = function (_collector, _reporter) {
collector.add(report)
})

if (Array.isArray(this.reporter)) {
this.reporter.forEach(function (_reporter) {
reporter.add(_reporter)
})
} else {
reporter.add(this.reporter)
}
this.reporter.forEach(function (_reporter) {
reporter.add(_reporter)
})

reporter.write(collector, true, function () {})
}
Expand Down
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"description": "a code coverage tool that works well with subprocesses.",
"main": "index.js",
"scripts": {
"test": "standard && ./bin/nyc.js tap ./test/nyc-test.js",
"coverage": "./bin/nyc.js report --reporter=text-lcov | coveralls"
"test": "standard && tap --coverage ./test/nyc-test.js"
},
"bin": {
"nyc": "./bin/nyc.js"
Expand Down Expand Up @@ -47,11 +46,10 @@
"yargs": "^3.8.0"
},
"devDependencies": {
"chai": "^2.3.0",
"coveralls": "^2.11.2",
"chai": "^3.0.0",
"sinon": "^1.14.1",
"standard": "^3.7.3",
"tap": "1.0.4"
"standard": "^4.0.1",
"tap": "^1.2.0"
},
"repository": {
"type": "git",
Expand Down