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
The NgxEchartsDirective is not properly handling being destroyed when used in component tests in combination with explicit change detection calls
Observed behavior
When testing the usage of the echarts directive within a parent component and triggering change detection via fixture.detectChanges(), jest reports an error:
Error: 1 component threw errors during cleanup
Expected behavior
The directive should be destroyed without causing errors
Potential causes
I assume this is due to the use of ChangeFilter and subscriptions in ngOnChanges that are not being unsubscribed in ngOnDestroy
Technologies & Versions:
Angular: 15.0.1 ngx-echarts: 15.0.1 jest: 28.1.1
The text was updated successfully, but these errors were encountered:
Hi @homj ,
Please try to upgrade ngx-echarts@v15.0.2. The ChangeFilter subscriptions are unsubscribed now. But I'm not sure if it solves this issue, as I didn't reproduce this error using the spec in gist. Looking forward to your reply.
Problem
The
NgxEchartsDirective
is not properly handling being destroyed when used in component tests in combination with explicit change detection callsObserved behavior
When testing the usage of the echarts directive within a parent component and triggering change detection via
fixture.detectChanges()
, jest reports an error:Expected behavior
The directive should be destroyed without causing errors
Potential causes
I assume this is due to the use of
ChangeFilter
and subscriptions inngOnChanges
that are not being unsubscribed inngOnDestroy
Technologies & Versions:
Angular: 15.0.1
ngx-echarts: 15.0.1
jest: 28.1.1
The text was updated successfully, but these errors were encountered: