Skip to content

Commit

Permalink
Upgrade to Jest v30 alpha and esbuild-register for jest.config.ts (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
karlhorky authored Oct 8, 2024
1 parent ea5abd4 commit 6e114d9
Show file tree
Hide file tree
Showing 3 changed files with 517 additions and 558 deletions.
6 changes: 4 additions & 2 deletions jest.config.js → jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
/** @jest-config-loader esbuild-register */

import type { Config } from 'jest';
import nextJest from 'next/jest.js';

// https://nextjs.org/docs/app/building-your-application/testing/jest
const createJestConfig = nextJest({
dir: './',
});

/** @type {import('jest').Config} */
const config = {
const config: Config = {
testEnvironment: 'jest-environment-jsdom',
testPathIgnorePatterns: ['<rootDir>/playwright/'],
};
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"tsx": "^4.19.1"
},
"devDependencies": {
"@jest/globals": "^29.7.0",
"@jest/globals": "^30.0.0-alpha.6",
"@playwright/test": "^1.47.2",
"@testing-library/jest-dom": "^6.5.0",
"@testing-library/react": "^16.0.1",
Expand All @@ -32,10 +32,11 @@
"@types/node": "^22.7.4",
"@types/react": "^18.3.10",
"@types/react-dom": "^18.3.0",
"esbuild-register": "^3.6.0",
"eslint": "^9.11.1",
"eslint-config-upleveled": "^8.7.2",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest": "^30.0.0-alpha.6",
"jest-environment-jsdom": "^30.0.0-alpha.6",
"libpg-query": "16.2.0",
"prettier": "^3.3.3",
"prettier-plugin-embed": "^0.4.15",
Expand Down
Loading

0 comments on commit 6e114d9

Please sign in to comment.