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
After upgrading to Angular 19.0.0-next.11 from Angular 18.x my tests my tests that use MockRender started getting the error: "Forgot to flush TestBed? MockRender cannot be used without a reset..." These tests all worked properly before. I also tried taking the advice and calling MockRender like this fixture = MockRender('', {}, { reset: true });, but it did not help.
I noticed that as well.
It started with the flip of the default for standalone from false to true.
The logic how ng-mocks determines standalone components is the culprit I guess
Description of the bug
After upgrading to Angular 19.0.0-next.11 from Angular 18.x my tests my tests that use MockRender started getting the error: "Forgot to flush TestBed? MockRender cannot be used without a reset..." These tests all worked properly before. I also tried taking the advice and calling MockRender like this
fixture = MockRender('', {}, { reset: true });
, but it did not help.An example of the bug
You can see an example of the Angular 18 versions here: https://github.com/DDtMM/angular-signal-generators/blob/main/projects/signal-generators/src/lib/signals/tween-signal.spec.ts. The stack trace pointed to the
MockRender()
calls in the beforeEach. I'm assuming Angular changed something that affects ngMocks since I'm using it in a very minimal fashion for my project.Expected vs actual behavior
Don't throw that error.
The text was updated successfully, but these errors were encountered: