Closed truongnmt closed 3 years ago
Solved by setting webauthn-json
to be transform and explicitly set transform options ts-jest
for webauthn-json.js
:
...
transformIgnorePatterns: ['/node_modules/(?!@github)'],
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
'^.+\\webauthn-json.js$': 'ts-jest',
'^.+\\.(js|jsx)$': 'babel-jest',
'^.+\\.svg$': '<rootDir>/svgTransform.js',
},
...
Haven't figure out why babel-jest failed to compile though.
I'm writing a test using Jest and I encountered below error. Seem that Jest cannot parse
webauthn-json
.Here is my jest.config.js:
Here is my config for babel:
I'm using Jest 24.9.0,
webauthn-json
version 0.5.7, my setup is React as frontend with Jest for frontend test and Rails as backend.This could be an issue with Jest, sorry if I ask in wrong place 🙏 🙏 🙏 Just want to see that if any one has any idea with my setup.