Skip to content

Commit

Permalink
Port AVA workaround for Node 20
Browse files Browse the repository at this point in the history
  • Loading branch information
octet-stream committed May 30, 2023
1 parent 7b3192f commit f7fda27
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
7 changes: 5 additions & 2 deletions ava.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
export default {
failFast: true,
environmentVariables: {
TS_NODE_PROJECT: "tsconfig.ava.json"
},
extensions: {
ts: "module"
},
nodeArguments: [
"--no-warnings",
"--loader=ts-node/esm/transpile-only"
"--no-warnings"
],
files: [
"src/**/*.test.ts"
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"ci": "c8 npm test && c8 report --reporter=json",
"build:types": "tsc --project tsconfig.d.ts.json",
"build": "tsc && npm run build:types",
"test": "ava --fail-fast",
"test": "cross-env NODE_OPTIONS=\"--no-warnings --loader=ts-node/esm\" ava",
"cleanup": "del-cli @type lib",
"prepare": "npm run cleanup && npm run build",
"husky": "husky install"
Expand All @@ -72,6 +72,7 @@
"@typescript-eslint/parser": "5.55.0",
"ava": "5.2.0",
"c8": "7.13.0",
"cross-env": "^7.0.3",
"del-cli": "5.0.0",
"eslint": "8.36.0",
"eslint-config-airbnb-typescript": "17.0.0",
Expand Down
11 changes: 11 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f7fda27

Please sign in to comment.