-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
lCleanup[useCaptureOrSubIdx] is not a function / view.disposables[i] is not a function #162
Comments
The issue is caused by |
Here is app folder that can be used in e2e app.zip |
The error is thrown only on 2+ execution of |
The min test to reproduce the issue. import { Component, NgModule } from '@angular/core';
import { TestBed } from '@angular/core/testing';
import { BrowserModule } from '@angular/platform-browser';
import { MockBuilder, MockRender } from 'ng-mocks';
@Component({
selector: 'app-root',
template: `<a (click)="title = 'test'">click</a>`,
})
export class AppComponent {
title = 'ng-routing-test';
}
@NgModule({
bootstrap: [AppComponent],
declarations: [AppComponent],
imports: [BrowserModule],
providers: [],
})
export class AppModule {}
fdescribe('issue-162', () => {
beforeEach(() => MockBuilder(AppComponent, AppModule));
// triggers the error.
afterEach(() => TestBed.resetTestingModule());
it(`checks title`, () => {
const fixture = MockRender(AppComponent);
expect(fixture.point.componentInstance.title).toEqual('ng-routing-test');
});
}); It only affects already existing components that belong to another module, if a new component is created at runtime then everything is fine and the error doesn't appear. |
The problem is caused by mocked version of |
There's an interesting case that throws an error.
min project: ng-routing-test
The structure of the project should be like in the code sample above.
The text was updated successfully, but these errors were encountered: