|
67 | 67 | "build:wasm": "node build/wasm.js --docker",
|
68 | 68 | "lint": "standard | snazzy",
|
69 | 69 | "lint:fix": "standard --fix | snazzy",
|
70 |
| - "test": "node scripts/generate-pem && npm run test:unit && npm run test:node-fetch && npm run test:fetch && npm run test:cookies && npm run test:eventsource && npm run test:wpt && npm run test:websocket && npm run test:jest && npm run test:typescript && npm run test:node-test", |
71 |
| - "test:cookies": "borp --coverage -p \"test/cookie/*.js\"", |
72 |
| - "test:node-fetch": "borp --coverage -p \"test/node-fetch/**/*.js\"", |
73 |
| - "test:eventsource": "npm run build:node && borp --expose-gc --coverage -p \"test/eventsource/*.js\"", |
74 |
| - "test:fetch": "npm run build:node && borp --expose-gc --coverage -p \"test/fetch/*.js\" && borp --coverage -p \"test/webidl/*.js\"", |
75 |
| - "test:jest": "jest", |
| 70 | + "test": "npm run test:javascript && cross-env NODE_V8_COVERAGE= npm run test:typescript", |
| 71 | + "test:javascript": "node scripts/generate-pem && npm run test:unit && npm run test:node-fetch && npm run test:fetch && npm run test:cookies && npm run test:eventsource && npm run test:wpt && npm run test:websocket && npm run test:node-test && npm run test:jest", |
| 72 | + "test:cookies": "borp -p \"test/cookie/*.js\"", |
| 73 | + "test:node-fetch": "borp -p \"test/node-fetch/**/*.js\"", |
| 74 | + "test:eventsource": "npm run build:node && borp --expose-gc -p \"test/eventsource/*.js\"", |
| 75 | + "test:fetch": "npm run build:node && borp --expose-gc -p \"test/fetch/*.js\" && borp -p \"test/webidl/*.js\"", |
| 76 | + "test:jest": "cross-env NODE_V8_COVERAGE= jest", |
76 | 77 | "test:unit": "borp --expose-gc -p \"test/*.js\"",
|
77 |
| - "test:node-test": "borp --coverage -p \"test/node-test/**/*.js\"", |
78 |
| - "test:tdd": "borp --coverage --expose-gc -p \"test/*.js\"", |
| 78 | + "test:node-test": "borp -p \"test/node-test/**/*.js\"", |
| 79 | + "test:tdd": "borp --expose-gc -p \"test/*.js\"", |
79 | 80 | "test:tdd:node-test": "borp -p \"test/node-test/**/*.js\" -w",
|
80 | 81 | "test:typescript": "tsd && tsc --skipLibCheck test/imports/undici-import.ts",
|
81 |
| - "test:websocket": "borp --coverage -p \"test/websocket/*.js\"", |
| 82 | + "test:websocket": "borp -p \"test/websocket/*.js\"", |
82 | 83 | "test:wpt": "node test/wpt/start-fetch.mjs && node test/wpt/start-FileAPI.mjs && node test/wpt/start-mimesniff.mjs && node test/wpt/start-xhr.mjs && node test/wpt/start-websockets.mjs && node test/wpt/start-cacheStorage.mjs && node test/wpt/start-eventsource.mjs",
|
83 |
| - "coverage": "nyc --reporter=text --reporter=html npm run test", |
84 |
| - "coverage:ci": "nyc --reporter=lcov npm run test", |
| 84 | + "coverage": "npm run coverage:clean && cross-env NODE_V8_COVERAGE=./coverage/tmp npm run test && npm run coverage:report", |
| 85 | + "coverage:ci": "npm run coverage:clean && cross-env NODE_V8_COVERAGE=./coverage/tmp npm run test && npm run coverage:report:ci", |
| 86 | + "coverage:clean": "node ./scripts/clean-coverage.js", |
| 87 | + "coverage:report": "cross-env NODE_V8_COVERAGE= c8 report", |
| 88 | + "coverage:report:ci": "c8 report", |
85 | 89 | "bench": "echo \"Error: Benchmarks have been moved to '\/benchmarks'\" && exit 1",
|
86 | 90 | "serve:website": "echo \"Error: Documentation has been moved to '\/docs'\" && exit 1",
|
87 |
| - "prepare": "husky install", |
| 91 | + "prepare": "husky install && node ./scripts/platform-shell.js", |
88 | 92 | "fuzz": "jsfuzz test/fuzzing/fuzz.js corpus"
|
89 | 93 | },
|
90 | 94 | "devDependencies": {
|
|
93 | 97 | "@types/node": "^18.0.3",
|
94 | 98 | "abort-controller": "^3.0.0",
|
95 | 99 | "borp": "^0.9.1",
|
| 100 | + "c8": "^9.1.0", |
| 101 | + "cross-env": "^7.0.3", |
96 | 102 | "dns-packet": "^5.4.0",
|
97 | 103 | "form-data": "^4.0.0",
|
98 | 104 | "formdata-node": "^6.0.3",
|
|
0 commit comments