Skip to content

Commit

Permalink
chore: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 committed Jun 21, 2023
1 parent 173000a commit 018b086
Show file tree
Hide file tree
Showing 3 changed files with 946 additions and 73 deletions.
8 changes: 8 additions & 0 deletions packages/adapter-test/jest/jest-preset.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
// @ts-check

/** @type {import("@swc/core").Config} */
const swcConfig = {
jsc: {
parser: { syntax: "typescript", decorators: true },
transform: { legacyDecorator: true, decoratorMetadata: true },
},
}

/** @type {import("jest").Config} */
module.exports = {
transform: {
".(ts|tsx)$": ["@swc/jest", swcConfig],
Expand All @@ -16,4 +21,7 @@ module.exports = {
// collectCoverageFrom: ["<rootDir>/packages/*/src/**/*.{ts,tsx}"],
testURL: "http://localhost/",
moduleDirectories: ["node_modules"],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
}
5 changes: 3 additions & 2 deletions packages/adapter-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
"@babel/cli": "^7.14.3",
"@babel/plugin-transform-runtime": "^7.14.3",
"@babel/preset-env": "^7.14.2",
"@types/jest": "^26.0.23",
"@swc/core": "^1.2.198",
"@types/jest": "^29.5.2",
"@types/nodemailer": "^6.4.4",
"jest": "^27.0.3",
"jest": "^29.5.0",
"ts-jest": "^27.0.3",
"typescript": "^4.2.4"
}
Expand Down
Loading

1 comment on commit 018b086

@vercel
Copy link

@vercel vercel bot commented on 018b086 Jun 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.