Skip to content

Commit

Permalink
Reorganize tests
Browse files Browse the repository at this point in the history
* Rename test directory to test-tap

This makes way for new, self-hosted tests inside a test directory

* Rewrite TypeScript test to use tsd; move into test-d directory

* Simplify npm run scripts

* Invoke nyc ourselves

* Don't store tap and nyc configuration in package.json

* Remove stdout / stderr from reporter test fixtures

These've ended up being flaky on Windows all of a sudden.
  • Loading branch information
novemberborn authored Mar 29, 2020
1 parent 5d79170 commit f07eec8
Show file tree
Hide file tree
Showing 362 changed files with 1,641 additions and 698 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Try and avoid making breaking changes. Those take more time to ship. Instead mak

Non-experimental features should be accompanied with tests and documentation.

Don't include unrelated changes in your pull request. Make sure tests pass on your machine by running `npm test`. You can run specific test files as well using `npx tap --no-cov test/{file}.js`.
Don't include unrelated changes in your pull request. Make sure tests pass on your machine by running `npm test`. You can run specific test files as well using `npx tap test-tap/{file}.js`.

When you make a pull request please use a clear and descriptive title. Be specific about what's changed and why.

Expand Down
12 changes: 12 additions & 0 deletions .taprc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
browser: false
coverage: false
esm: false
files:
- "test-tap/*.js"
- "test-tap/reporters/*.js"
- "test-tap/integration/*.js"
flow: false
jobs: 2
jsx: false
timeout: 300
ts: false
2 changes: 1 addition & 1 deletion maintaining.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
## Testing

* `npm test`: Lint the code and run the entire test suite with coverage.
* `npx tap --no-cov test/fork.js --bail`: Run a specific test file and bail on the first failure (useful when hunting bugs).
* `npx tap test-tap/fork.js --bail`: Run a specific test file and bail on the first failure (useful when hunting bugs).

## CI

Expand Down
14 changes: 14 additions & 0 deletions nyc.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use strict';

module.exports = {
all: true,
exclude: [
'{coverage,media,test-d,test-tap}/**',
'*.config.js'
],
reporter: [
'html',
'lcov',
'text'
]
};
Loading

0 comments on commit f07eec8

Please sign in to comment.