You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello
I am trying to use swc for my jest test. I have done the required configuration and all the pure javascript tests runs fine.
However, when I try to run any tests for react component that uses react-intl, it fails with the below error:
[@formatjs/intl] An `id` must be provided to format a message. You can either:
1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)
or [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR
2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)
to autofix this issue
In my current setup, I am using the below plugin my .babelrc file
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello
I am trying to use swc for my jest test. I have done the required configuration and all the pure javascript tests runs fine.
However, when I try to run any tests for react component that uses react-intl, it fails with the below error:
In my current setup, I am using the below plugin my .babelrc file
So I believe I will need to do this somehow when using SWC. Would really appreciate if anyone can help me with this.
Beta Was this translation helpful? Give feedback.
All reactions