Skip to content

Commit

Permalink
feat(tooling): Replace ts-node with tsimp for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
octet-stream committed Jun 30, 2024
1 parent d05eda2 commit 877889f
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 17 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ coverage
*.old
@type

# tsimp cache
.tsimp

/src/**/*.js
/lib
4 changes: 1 addition & 3 deletions ava.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
export default {
failFast: true,
environmentVariables: {
TS_NODE_PROJECT: "./tsconfig.ava.json"
},
nodeArguments: ["--no-warnings", "--import=tsimp"],
extensions: {
ts: "module"
},
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@
"coverage": "c8 pnpm test",
"ci": "c8 pnpm test && c8 report --reporter=json",
"build": "pnpm exec del-cli lib && pnpm exec tsup",
"test": "cross-env NODE_OPTIONS=\"--no-warnings --experimental-fetch --loader=ts-node/esm\" ava",
"test": "ava",
"report:html": "c8 -r=html pnpm test",
"release": "pnpm build && pnpm changeset publish",
"prepare": "npx is-in-ci || husky install"
"prepare": "npx is-in-ci@latest || husky install"
},
"devDependencies": {
"@biomejs/biome": "1.8.3",
Expand All @@ -64,7 +65,7 @@
"node-fetch": "3.3.2",
"sinon": "18.0.0",
"ts-expect": "1.3.0",
"ts-node": "10.9.2",
"tsimp": "2.0.11",
"tsup": "8.1.0",
"ttypescript": "1.5.15",
"typescript": "5.5.2",
Expand Down
74 changes: 71 additions & 3 deletions pnpm-lock.yaml

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

7 changes: 0 additions & 7 deletions tsconfig.ava.json

This file was deleted.

2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"baseUrl": "src",
"checkJs": false,
"allowJs": false,
"skipLibCheck": false,
"skipLibCheck": true,
"strict": true,
"resolveJsonModule": true,
"isolatedModules": true,
Expand Down

0 comments on commit 877889f

Please sign in to comment.