Skip to content

Commit 64ed86f

Browse files
committed
feat: add ts-jest to webdriver-ts
1 parent e4782f3 commit 64ed86f

File tree

6 files changed

+617
-375
lines changed

6 files changed

+617
-375
lines changed

webdriver-ts/.eslintrc.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
{
22
"root": true,
33
"parser": "@typescript-eslint/parser",
4-
"plugins": [
5-
"@typescript-eslint"
6-
],
4+
"plugins": ["@typescript-eslint"],
75
"extends": [
86
"eslint:recommended",
97
"plugin:@typescript-eslint/eslint-recommended",
@@ -19,4 +17,4 @@
1917
"require-await": "error",
2018
"@typescript-eslint/no-floating-promises": "error"
2119
}
22-
}
20+
}

webdriver-ts/jest.config.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/** @type {import('ts-jest').JestConfigWithTsJest} */
2+
export default {
3+
modulePathIgnorePatterns: ["<rootDir>/dist/"],
4+
clearMocks: true,
5+
coverageProvider: "v8",
6+
// Need for mapping imported .js as .ts. Required due to moduleResolution: "NodeNext" in tsconfig.json.
7+
extensionsToTreatAsEsm: [".ts"],
8+
moduleNameMapper: {
9+
"^(\\.{1,2}/.*)\\.js$": "$1",
10+
},
11+
transform: {
12+
"^.+\\.tsx?$": [
13+
"ts-jest",
14+
{
15+
isolatedModules: true,
16+
useESM: true,
17+
},
18+
],
19+
},
20+
};

webdriver-ts/jest.config.ts

Lines changed: 0 additions & 195 deletions
This file was deleted.

0 commit comments

Comments
 (0)