test: consolidate on tap test runner, stop running build step #997
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.
In this pull request I've refactored tests to stop running a build step. to facilitate this there's now a helper called
reset-state.js
that resets global state between test runs.I've also opted to move us back to one test runner (tap) now that this consolidation has happened. Here's how the tests are laid out now:
test/lib/reset-state.js
, called between test runs to reset state.test/nyc-index.js
, tests mainly for methods inindex.js
.test/nyc-integration.js
, CLI integration tests (@JaKXz after we land this, I think this would be a great candidate for using snapshots like we did withc8
).test/process-args.js
, tests for the process-args.js helper.TODO:
coverage for process-args.js is missing for some reasonI'm not sure how this could have ever worked because we don't instrument process-args, we will have coverage for this file once we switch our coverage approach.Note:
I've commented out the test:
it('should include \'node_modules\' using exclude patterns')
which also seems to be failing on
master
, CC: @AndrewFinlay.Future Work:
Once we land this, I'd like to switch us to using
c8
shortly afterwards, and eliminate the other wonky build step we have in the codebase.It would also be awesome to switch to snapshots for
test-integration.js
.