This repository was archived by the owner on Dec 2, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 37
Add nyc and browser code coverage #169
Merged
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
70592c6
remove old coverage setup
vweevers 720a9ac
add nyc and coveralls
vweevers 2b83f8e
temporarily depend on airtap/airtap#coverage
vweevers aed8e83
coverage is opt-in now
vweevers 4cc2334
remove faucet
vweevers 923de0f
Switch to airtap@0.0.9
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
node_modules | ||
coverage | ||
npm-debug.log | ||
.nyc_output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,10 +26,10 @@ | |
"safe-buffer": "~5.1.1" | ||
}, | ||
"devDependencies": { | ||
"airtap": "^0.0.8", | ||
"airtap": "github:airtap/airtap#coverage", | ||
"coveralls": "^3.0.2", | ||
"faucet": "^0.0.1", | ||
"istanbul": "^0.4.2", | ||
"istanbul-coveralls": "^1.0.3", | ||
"nyc": "^12.0.2", | ||
"rimraf": "^2.6.2", | ||
"standard": "^11.0.0", | ||
"tape": "^4.8.0" | ||
|
@@ -38,11 +38,10 @@ | |
"./immediate.js": "./immediate-browser.js" | ||
}, | ||
"scripts": { | ||
"test": "standard && node test.js | faucet", | ||
"test-browsers": "airtap --sauce-connect --loopback airtap.local --no-coverage test.js", | ||
"test-browser-local": "airtap --no-coverage --local 9000 test.js", | ||
"coverage": "istanbul cover -i memdown.js ./node_modules/.bin/tape ./test.js && istanbul check-coverage --lines 90 --function 80 --statements 90 --branches 80", | ||
"report-coverage": "npm run coverage && istanbul-coveralls" | ||
"test": "standard && nyc --silent node test.js | faucet", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See above ;) #169 (comment) |
||
"test-browsers": "airtap --sauce-connect --loopback airtap.local --coverage test.js", | ||
"test-browser-local": "airtap --coverage --local 9000 test.js", | ||
"coverage": "nyc report --reporter=text-lcov | coveralls" | ||
}, | ||
"license": "MIT", | ||
"engines": { | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @ralphtheninja
--silent
disables the coverage summary at the end of test outputThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should enable it and remove faucet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm okay with either. On the one hand, faucet reduces the output, on the other, the coverage summary is kinda nice (though when coverage matters, I prefer using
nyc report --reporter=html
).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ralphtheninja your call
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be optimal if we could have both
faucet
and the coverage report (maybe we can figure out a solution for this somehow?).I just think it's really useful to have that report while testing locally. "Did I fuck up coverage? Did coverage change?"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maye we can just hack
faucet
to let stuff pass through. I'm guessing it'sfaucet
that prevents thenyc
output?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
level-faucet
:)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably difficult because
tap-parser
considers the test to be complete afterPerhaps when
tap-parser
emits "complete", we can switch stdin to pipe to stdout.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ralphtheninja it's a rabbit hole, mind if open an issue for later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh definitely. Lets solve this later. I'm happy as long as I can get the coverage report. Let's just remove
faucet
now and bring it back later.