diff --git a/playground/template-prisma/jest.config.js b/playground/template-prisma/jest.config.js new file mode 100644 index 00000000..b413e106 --- /dev/null +++ b/playground/template-prisma/jest.config.js @@ -0,0 +1,5 @@ +/** @type {import('ts-jest').JestConfigWithTsJest} */ +module.exports = { + preset: 'ts-jest', + testEnvironment: 'node', +}; \ No newline at end of file diff --git a/playground/template-prisma/package.json b/playground/template-prisma/package.json index 89813d57..f93066d3 100644 --- a/playground/template-prisma/package.json +++ b/playground/template-prisma/package.json @@ -8,9 +8,9 @@ "build": "flux build --typecheck", "dev": "flux start --watch --sdk", "dev:typecheck": "flux start --watch --typecheck", - "debug": "flux start --watch --sdk --debug", + "debug": "flux start --watch --sdk --debug", "sdk": "flux sdk", - "jest": "jest", + "test": "jest", "lint": "eslint src/", "prisma": "prisma" }, @@ -32,17 +32,12 @@ "@typescript-eslint/parser": "^5.55.0", "axios": "^1.3.4", "esbuild": "^0.17.12", - "esbuild-jest": "^0.5.0", "eslint": "^8.36.0", "fastify-flux-cli": "*", "jest": "^29.5.0", "pino-pretty": "^10.0.0", "prisma": "^4.11.0", + "ts-jest": "^29.0.5", "typescript": "5.0.3" - }, - "jest": { - "transform": { - "^.+\\.tsx?$": "esbuild-jest" - } } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d9f0966a..e294f541 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -274,9 +274,6 @@ importers: esbuild: specifier: ^0.17.12 version: 0.17.12 - esbuild-jest: - specifier: ^0.5.0 - version: 0.5.0(esbuild@0.17.12) eslint: specifier: ^8.36.0 version: 8.36.0 @@ -292,6 +289,9 @@ importers: prisma: specifier: ^4.11.0 version: 4.11.0 + ts-jest: + specifier: ^29.0.5 + version: 29.0.5(@babel/core@7.21.4)(esbuild@0.17.12)(jest@29.5.0)(typescript@5.0.3) typescript: specifier: 5.0.3 version: 5.0.3