You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/12/08 13:28:14 UTC
[GitHub] [echarts] FibreFoX commented on issue #16709: [Bug] package.json is missing a package "type": "module" description
FibreFoX commented on issue #16709:
URL: https://github.com/apache/echarts/issues/16709#issuecomment-1342738328
@Sujith1799 not yet, the only workaround I know is to not import the page when testing, as suggested here: https://github.com/facebook/create-react-app/issues/12063#issuecomment-1215725669
Something like this:
```js
// important: exclude this from testing, because Jest is unable to work with Apache EChart
// https://github.com/facebook/create-react-app/issues/12063
const YourComponentWithEcharts = (process.env.NODE_ENV === "test") ? (() => {
return null;
}) : lazy(() => import("./YourComponentWithEcharts"));
```
This does not "make it testable", it just makes jest jump over the problematic stuff (until its fixed).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org