Closed VictorJSV closed 1 year ago
Hi @VictorJSV. We have no plans at this time to export the SDK as CommonJS. Can you try adding the below transformIgnorePatterns option to your package.json
?
"jest": {
"transformIgnorePatterns": [
"/node_modules/(?!@braze)"
]
}
Oops!. It works, but I needed to add some more characters
jestConfig = {
transformIgnorePatterns: ["/node_modules/(?!.*\\.mjs$|@braze)"],
}
Thank you!
What problem are you facing?
When I test angular components with Jest and it have a Braze SDK configuration. Show me in console
Inside
node_modules/@braze/web-sdk
have ESM modules.Jest support CommonJS files and ESM modules is in experimental mode.
Jest v28.1.2 Angular v14
Workarounds
I'm investigating
Ideal Solution
Could be export in commonJS?
Other Information
No response