Skip to content

Commit 66f715c

Browse files
authored
πŸš‘ Hotfix test:prebuild (#29)
1 parent e88476b commit 66f715c

4 files changed

Lines changed: 21 additions & 2 deletions

File tree

β€Ž.gitignoreβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ lib/*.js
3939
test/*.js
4040
*.map
4141

42+
*.tsbuildinfo
43+
4244
# Project specific
4345
WABT
4446
core/

β€Žpackage.jsonβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717
"clean": "rm -rf dist",
1818
"build": "npm run build:cjs",
1919
"build:cjs": "tsc --project tsconfig.build.json",
20+
"build:tests": "tsc --outDir out --project tsconfig.tests.json",
2021
"watch": "tsc -watch -p ./",
2122
"lint": "eslint src/**/* --config .eslint.config.mjs",
22-
"test:prebuild": "npm run build && npx tsc tests/unit/* --outDir out --sourceMap",
23+
"test:prebuild": "npm run build && npm run build:tests",
2324
"test:all": "npm run test:prebuild && npm run test:ava",
2425
"test:ava": "ava",
2526
"coverage:test:ava": "c8 --src src/ --all ava"

β€Žtsconfig.build.jsonβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"noEmit": false,
1010
"declaration": true,
1111
"declarationDir": "dist/types",
12-
"incremental": true
12+
"incremental": true,
13+
"resolveJsonModule": true
1314
}
1415
}

β€Žtsconfig.tests.jsonβ€Ž

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"extends": "./tsconfig.build.json",
3+
"include": [
4+
"tests/unit/**/*.ts"
5+
],
6+
"compilerOptions": {
7+
"rootDir": ".",
8+
"sourceMap": true,
9+
"noEmit": false,
10+
"declaration": true,
11+
"declarationDir": "dist/types",
12+
"incremental": true,
13+
"resolveJsonModule": true
14+
}
15+
}

0 commit comments

Comments
Β (0)