-
-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Ng19=next - Forgot to flush TestBed? MockRender cannot be used without a reset #10306
Comments
I noticed that as well. |
I've submitted a PR (#10583) to fix the "Forgot to flush TestBed?" error in Angular 19 when using MockRender. If you've been experiencing this bug, please review the PR and let me know if it works for you. |
Experiencing this as well, it's blocking our angular 19 upgrade. |
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: