-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to use amCharts in tests: export { System, system } from "./.internal/core/System"; #2133
Comments
@hutber You need to add this to your Jest configuration: "transformIgnorePatterns": [
"node_modules[/\\\\](?!@amcharts[/\\\\]amcharts4)"
] |
Thanks again |
@Pauan thanks a lot |
@Pauan You are a genius |
@Pauan I have the same error as hutber. I made your changes to the Jest configuration but I still get the same error. [ Edit: I just found this link that says Jest does not work with amcharts. If that's still true then there is no solution. ]
Here is my jest.config.js
And here is my package.json
|
I also encountered this error in one project configuration (some component in library is using
to Jest configuration was not enough in this case. The following additional steps needed to solve this problem:
|
I also faced same issue but I used Angular FW. transformIgnorePatterns: [
"node_modules/(?!(ng-pick-datetime-moment|@amcharts/amcharts4))"
] the |
That is so it will work on both Windows and Linux/Mac, because Windows uses |
Oh. Let me check it again. Thanks for your reply. :) |
I did everything recommended before and it doesn't work for me. I am using nwrl.here is my jest config: |
@arielhj Try this: transformIgnorePatterns: ["node_modules/(?!vis-data|@amcharts)"], |
Maybe |
I am using a fairly basic site setup with react-create-app and then importing as the documentation suggests:
import * as am4core from '@amcharts/amcharts4/core'
There is no problem at all whilst using the charts, however when I run them in the test environment they fail with the below error.
Versions
amcharts4: v4.8.1
react-scripts: v3.3.0
ProvenanceChart/index.js
I do not believe I am doing anything outwardly different from a standard stack.
Test in question:
Project jest.config.js
Then finally ran with
npm test
The text was updated successfully, but these errors were encountered: