Skip to content

Commit f7fda27

Browse files
committed
Port AVA workaround for Node 20
1 parent 7b3192f commit f7fda27

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

ava.config.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
export default {
2+
failFast: true,
3+
environmentVariables: {
4+
TS_NODE_PROJECT: "tsconfig.ava.json"
5+
},
26
extensions: {
37
ts: "module"
48
},
59
nodeArguments: [
6-
"--no-warnings",
7-
"--loader=ts-node/esm/transpile-only"
10+
"--no-warnings"
811
],
912
files: [
1013
"src/**/*.test.ts"

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"ci": "c8 npm test && c8 report --reporter=json",
6060
"build:types": "tsc --project tsconfig.d.ts.json",
6161
"build": "tsc && npm run build:types",
62-
"test": "ava --fail-fast",
62+
"test": "cross-env NODE_OPTIONS=\"--no-warnings --loader=ts-node/esm\" ava",
6363
"cleanup": "del-cli @type lib",
6464
"prepare": "npm run cleanup && npm run build",
6565
"husky": "husky install"
@@ -72,6 +72,7 @@
7272
"@typescript-eslint/parser": "5.55.0",
7373
"ava": "5.2.0",
7474
"c8": "7.13.0",
75+
"cross-env": "^7.0.3",
7576
"del-cli": "5.0.0",
7677
"eslint": "8.36.0",
7778
"eslint-config-airbnb-typescript": "17.0.0",

pnpm-lock.yaml

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)