changing jest.config.js
transform option from -
transform: { '^.+\\.ts?$': 'ts-jest' },
to
transform: { '^.+\\.(js|jsx|ts|tsx)$': ['babel-jest', { presets: ['next/babel'] }], },
changing jest.config.js
transform option from -
transform: { '^.+\\.ts?$': 'ts-jest' },
to
transform: { '^.+\\.(js|jsx|ts|tsx)$': ['babel-jest', { presets: ['next/babel'] }], },