chore: move to swc/jest (#7739)

* chore: move to swc

* chore: fix tax rate tests

* chore: undo failed test

* chore: fix unit tests script

* chore: use node 20

* Update scripts/run-workspace-unit-tests-in-chunks.sh
This commit is contained in:
Riqwan Thamir
2024-06-20 12:59:33 +02:00
committed by GitHub
parent f61557712c
commit 03924a4ff6
137 changed files with 386 additions and 419 deletions
@@ -1,7 +1,7 @@
import { IAuthModuleService } from "@medusajs/types"
import { Modules } from "@medusajs/modules-sdk"
import { createAuthIdentities } from "../../__fixtures__/auth-identity"
import { IAuthModuleService } from "@medusajs/types"
import { moduleIntegrationTestRunner, SuiteOptions } from "medusa-test-utils"
import { createAuthIdentities } from "../../__fixtures__/auth-identity"
jest.setTimeout(30000)
+6 -4
View File
@@ -6,11 +6,13 @@ module.exports = {
"^@types": "<rootDir>/src/types",
},
transform: {
"^.+\\.[jt]s?$": [
"ts-jest",
"^.+\\.[jt]s$": [
"@swc/jest",
{
tsconfig: "tsconfig.spec.json",
isolatedModules: true,
jsc: {
parser: { syntax: "typescript", decorators: true },
transform: { decoratorMetadata: true },
},
},
],
},
-2
View File
@@ -39,8 +39,6 @@
"jest": "^29.7.0",
"medusa-test-utils": "^1.1.42",
"rimraf": "^3.0.2",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"tsc-alias": "^1.8.6",
"typescript": "^5.1.6"
},
@@ -5,6 +5,7 @@ import {
OnInit,
PrimaryKey,
Property,
Rel,
} from "@mikro-orm/core"
import {
@@ -52,7 +53,7 @@ export default class ProviderIdentity {
@ManyToOne(() => AuthIdentity, {
persist: false,
})
auth_identity: AuthIdentity
auth_identity: Rel<AuthIdentity>
@Property({ columnType: "jsonb", nullable: true })
user_metadata: Record<string, unknown> | null