Skip to content

Commit 4035284

Browse files
committed
Use test-director and hard-rejection for tests instead of tap.
1 parent f8f1195 commit 4035284

23 files changed

+1427
-1319
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ node_modules
33
/universal
44
/server
55
/test
6-
tap-snapshots

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ npm-debug.log
44
/universal
55
/server
66
/test
7-
.nyc_output

.prettierignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
package.json
2-
.nyc_output
3-
tap-snapshots

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
- Updated Node.js support from v8.10+ to v10+.
88
- Updated dependencies, some of which require Node.js v10+.
9+
- Replaced the [`tap`](https://npm.im/tap) dev dependency with [`test-director`](https://npm.im/test-director) and [`hard-rejection`](https://npm.im/hard-rejection), and refactored tests accordingly. This improves the dev experience and reduced the dev install size by ~75.5 MB.
910

1011
### Patch
1112

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
"formdata-node": "^2.1.1",
7272
"graphql": "^14.6.0",
7373
"graphql-api-koa": "^4.1.1",
74+
"hard-rejection": "^2.1.0",
7475
"jsdoc-md": "^5.0.1",
7576
"koa": "^2.7.0",
7677
"koa-bodyparser": "^4.3.0",
@@ -79,7 +80,7 @@
7980
"react-dom": "^16.13.1",
8081
"react-test-renderer": "^16.13.1",
8182
"size-limit": "^4.4.0",
82-
"tap": "^14.10.7"
83+
"test-director": "^4.0.0"
8384
},
8485
"scripts": {
8586
"prepare": "npm run prepare:clean && npm run prepare:mjs && npm run prepare:js && npm run prepare:jsdoc && npm run prepare:prettier",
@@ -88,10 +89,11 @@
8889
"prepare:js": "babel src -d .",
8990
"prepare:jsdoc": "jsdoc-md",
9091
"prepare:prettier": "prettier '{universal,server,test}/**/*.{mjs,js}' readme.md --write",
91-
"test": "npm run test:eslint && npm run test:prettier && npm run test:tap && npm run test:size",
92+
"test": "npm run test:eslint && npm run test:prettier && npm run test:esm && npm run test:cjs && npm run test:size",
9293
"test:eslint": "eslint . --ext mjs,js",
9394
"test:prettier": "prettier '**/*.{json,yml,md}' -l",
94-
"test:tap": "tap test/*.{mjs,js}",
95+
"test:esm": "if node --input-type=module -e '' > /dev/null 2>&1; then node -r hard-rejection/register test/index.mjs; fi",
96+
"test:cjs": "node -r hard-rejection/register test",
9597
"test:size": "size-limit",
9698
"prepublishOnly": "npm test"
9799
}

0 commit comments

Comments
 (0)