Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Jan 18, 2025
1 parent 2c16d5d commit 13b610e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"test": "npm run lint -- --fix && vitest run",
"test-keepalive": "cross-env TEST_KEEPALIVE_COUNT=50 vitest run --test-timeout 180000 keep-alive-header.test.ts",
"test-node16": "node examples/httpclient.cjs && node examples/search_github.cjs && node examples/timing.cjs",
"cov": "cross-env NODE_OPTIONS='--loader=./test/patch-structuredClone.mjs' vitest run --coverage",
"cov": "cross-env NODE_OPTIONS='--require ./test/patch-structuredClone.cjs' vitest run --coverage",
"ci": "npm run lint && npm run cov && npm run prepublishOnly && npm pack && attw --pack",
"clean": "rm -rf dist",
"prepublishOnly": "npm run build"
Expand Down
7 changes: 7 additions & 0 deletions test/patch-structuredClone.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const structuredClone = require('@ungap/structured-clone').default;

// vitest require structuredClone
if (!('structuredClone' in globalThis)) {
globalThis.structuredClone = structuredClone;
// console.debug('patched structuredClone for Node.js %s', process.version);
}
6 changes: 0 additions & 6 deletions test/patch-structuredClone.mjs

This file was deleted.

0 comments on commit 13b610e

Please sign in to comment.