Skip to content

Commit 1e3cc70

Browse files
committed
adding a tsconfig just to build the test files
1 parent b677f76 commit 1e3cc70

3 files changed

Lines changed: 27 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"scripts": {
1414
"build": "webpack --env production",
1515
"build:dev": "webpack --env development",
16-
"build:test": "webpack --config test.config.js",
16+
"build:test": "webpack --config webpack.test.config.js",
1717
"eslint": "eslint 'src/**' 'tests/**'",
1818
"lint": "npm run eslint && npm run prettier -- --list-different && npm run knip",
1919
"lint:fix": "npm run eslint -- --fix && npm run prettier -- --write",

tsconfig.test.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"compilerOptions": {
3+
"allowJs": true,
4+
"rootDir": "./",
5+
"outDir": "./dist/",
6+
"noImplicitAny": true,
7+
"strictPropertyInitialization": true,
8+
"sourceMap": true,
9+
"target": "es2023",
10+
"module": "NodeNext",
11+
"moduleResolution": "NodeNext",
12+
"strict": true,
13+
"esModuleInterop": true
14+
},
15+
"ts-node": {
16+
"files": true
17+
},
18+
"include": ["./src/**/*"]
19+
}

test.config.js renamed to webpack.test.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@ export default {
2626
rules: [
2727
{
2828
test: /\.ts$/,
29-
use: 'ts-loader',
29+
use: [
30+
{
31+
loader: 'ts-loader',
32+
// This test file includes the variant-coverage directory, which is not included in the main tsconfig.json
33+
options: { configFile: 'tsconfig.test.json' }
34+
}
35+
],
3036
exclude: /node_modules/
3137
}
3238
]

0 commit comments

Comments
 (0)