ng-mocks: Bug? Cannot combine @Input decorators with query decorators

Hi,

im using your lib version 10.1.2 with angular 9.1.2 in combination with the Syncfusion angular framework.

I’m getting the following error when I run my tests: `

Error: Cannot combine @Input decorators with query decorators
    at http://localhost:9876/_karma_webpack_/D:/Work/Java

`

Code looks like follows:

describe('XComponent', () => {
    let component: XComponent;
    let fixture: MockedComponentFixture<XComponent>;
    beforeEach(() => MockBuilder(XComponent, XModule)
        .provide({provide: ControlContainer, useValue: fgd}),
    );
    beforeEach(() => {
        fixture = MockRender(XComponent);
        component = fixture.point.componentInstance;
        fixture.detectChanges();
    });
    it('should create', () => {
        expect(component).toBeTruthy();
        expect(component.controlContainer).toBeDefined();
    });
});

I’m not sure if this is caused by the mock framework or by the syncfusion library. Running the project works fine; even as building the project. This just happens when running the tests.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 16 (9 by maintainers)

Commits related to this issue

Most upvoted comments

Works like a charm!