Skip to content

Commit 018b086

Browse files
committed
chore: fix tests
1 parent 173000a commit 018b086

File tree

3 files changed

+946
-73
lines changed

3 files changed

+946
-73
lines changed

packages/adapter-test/jest/jest-preset.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1+
// @ts-check
2+
3+
/** @type {import("@swc/core").Config} */
14
const swcConfig = {
25
jsc: {
36
parser: { syntax: "typescript", decorators: true },
47
transform: { legacyDecorator: true, decoratorMetadata: true },
58
},
69
}
10+
11+
/** @type {import("jest").Config} */
712
module.exports = {
813
transform: {
914
".(ts|tsx)$": ["@swc/jest", swcConfig],
@@ -16,4 +21,7 @@ module.exports = {
1621
// collectCoverageFrom: ["<rootDir>/packages/*/src/**/*.{ts,tsx}"],
1722
testURL: "http://localhost/",
1823
moduleDirectories: ["node_modules"],
24+
moduleNameMapper: {
25+
'^(\\.{1,2}/.*)\\.js$': '$1',
26+
},
1927
}

packages/adapter-test/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@
1616
"@babel/cli": "^7.14.3",
1717
"@babel/plugin-transform-runtime": "^7.14.3",
1818
"@babel/preset-env": "^7.14.2",
19-
"@types/jest": "^26.0.23",
19+
"@swc/core": "^1.2.198",
20+
"@types/jest": "^29.5.2",
2021
"@types/nodemailer": "^6.4.4",
21-
"jest": "^27.0.3",
22+
"jest": "^29.5.0",
2223
"ts-jest": "^27.0.3",
2324
"typescript": "^4.2.4"
2425
}

0 commit comments

Comments
 (0)