Problem with DevExtreme and angular testing

566 Views Asked by At

I'm developing some unit tests in Angular for one of my components and I'm having the following problem:

Failed: Template parse errors: Can't bind to 'dataSource' since it isn't a known property of 'dx-data-grid'.
  • If dx-data-grid is an Angular component and it has dataSource input, then verify that it is part of this module.
  • If dx-data-grid is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

it seems to be a bug of some dependency, can someone help me with this? Thank you.

1

There are 1 best solutions below

2
On

The error tries to tell you that you need to add the missing component or module to the testing module. On the Angular homepage there is a nice introduction to unit testing, best go through this once to see how to set up the TestBed: https://angular.io/guide/testing-components-basics

Great that you start testing!