Skip to content

Commit ce9d747

Browse files
tests: fix the includes in test/tsconfig.json and switch to modern node18 module (#2740)
- typescript checking was not properly working before in src/ directory - https://www.typescriptlang.org/tsconfig/#node16node18nodenext: node18 is the up-to-date module. This picks the module resolution "node16" - https://www.typescriptlang.org/tsconfig/#moduleResolution recommends not using node (node10) in modern code - Update target to ES2024
1 parent 03df73e commit ce9d747

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

tests/tsconfig.json

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
{
22
"compilerOptions": {
3-
"moduleResolution": "node",
4-
"module": "ESNext",
5-
"target": "es2022",
3+
// This implicitly sets moduleResolution to "node16"
4+
// https://www.typescriptlang.org/docs/handbook/modules/theory.html#module-resolution-is-host-defined
5+
"module": "Node18",
6+
"target": "ES2024",
67
"lib": [
7-
"es2022",
8-
"dom"
8+
// https://www.typescriptlang.org/tsconfig/#lib
9+
// include APIs that are enabled by ES2024
10+
"ES2024",
11+
// DOM definitions, window, document, etc.
12+
"DOM"
913
],
1014
"types": [
1115
"node",
@@ -24,7 +28,7 @@
2428
"noFallthroughCasesInSwitch": true
2529
},
2630
"include": [
27-
"test",
31+
"src/**/*.ts",
2832
"wdio.conf.ts"
2933
]
3034
}

0 commit comments

Comments
 (0)