Open ibrahim-azez opened 2 years ago
I'm having the same error with import ChartDataLabels from 'chartjs-plugin-datalabels';
. It happend after updating chartjs to version 3.x. Tests won't even render the component, but they don't fail if I comment the ChartDataLabels variable on my chart. It was working fine before the update.
An alternative I found to run the tests was the mock in the plugin:
jest.mock('../../../../../../../../node_modules/chartjs-plugin-datalabels/dist/chartjs-plugin-datalabels.js', () => ({
__esModule: true
}));
I don't think it's the best way, but it temporarily solves it.
Hi, I have the error down below, this happened in jest after editing jest default configs. I am using Nx Angular to run the test. Please take a look on the related issues down.
Current Behavior
My test file in angular:
My jest config:
Expected Behavior
Steps to Reproduce
Environment
Related Issues
#11888 nx-angular-typeerror-import-chart-registerables-is-not-iterable