If instead of babel you're using ts-jest, configure ts-jest
as the transformer by running
npx ts-jest config:init
See https://kulshekhar.github.io/ts-jest/docs/getting-started/installation/#jest-config-file
This will add the following to your jest.config.js
config file:
transform: {
"^.+.tsx?$": ["ts-jest",{}],
},