Skip to content

Commit ac15185

Browse files
committed
refactor: update Jest transform to use automatic JSX runtime
1 parent abacd56 commit ac15185

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

jest.config.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,21 @@ const config = {
1717
testEnvironment: 'jsdom',
1818
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
1919
transform: {
20-
'^.+\\.(js|jsx|ts|tsx)$': ['babel-jest', { presets: ['next/babel'] }]
20+
'^.+\\.(js|jsx|ts|tsx)$': [
21+
'babel-jest',
22+
{
23+
presets: [
24+
[
25+
'next/babel',
26+
{
27+
'preset-react': {
28+
runtime: 'automatic',
29+
},
30+
},
31+
],
32+
],
33+
},
34+
],
2135
},
2236
transformIgnorePatterns: [
2337
'/node_modules/',

0 commit comments

Comments
 (0)