If this issue is related to using jest,
jest config for your package.json
should look like
with typescript –
"jest": {
...
"transform": {
"^.+\\.(ts|tsx|js|jsx)$": "ts-jest"
},
...
}
with js –
"jest": {
...
"transform": {
"^.+\\.(js|jsx)$": "babel-jest"
},
...
}
If you have a jest.config.js then this goes in there:
import type { Config } from 'jest'
const config: Config = {
...
"transform": {
"^.+\\.(ts|tsx|js|jsx)$": "ts-jest"
}
....
}
export default config