apexcharts / ng-apexcharts

ng-apexcharts is an implementation of apexcharts for angular. It comes with one simple component that enables you to use apexcharts in an angular project.
MIT License
330 stars 81 forks source link

Cannot find module 'ng-apexcharts' in spec.ts #233

Closed Shadowblash closed 3 months ago

Shadowblash commented 2 years ago

Hi,

I'm currently trying to do unit tests on my Angular app using ng-apexcharts lib. Unfortunately, when I run my tests with Jest, I get this error:

Cannot find module 'ng-apexcharts' from 'src/app/modules/gridComparisons/display-comparison/display-comparison.component.spec.ts'

image

The library is well imported in my module and I can use the charts in my component. But the unit tests are not valid.

I'm currently using : "apexcharts": "3.29.0" "ng-apexcharts": "^1.7.1" Angular 12

I tried everything, re-install node_modules, import the script "node_modules/apexcharts/dist/apexcharts.min.js" in the angular.json file

Why does it work in my components and not in the unit tests? Is there an incompatibility with Jest? Thanks.

github-actions[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.