Unit testing ag-grid in Angular 2

后端 未结 3 2409
無奈伤痛
無奈伤痛 2021-02-20 02:20

Has someone worked on unit testing ag-grid components in Angular 2?

For me, this.gridOptions.api remains undefined when the test cases run.

3条回答
  •  春和景丽
    2021-02-20 03:11

    If you are using ag-grid enterprise make sure to include in your test file import 'ag-grid-enterprise'; otherwise you will see console errors and gridReady will never be called:

    Row Model "Server Side" not found. Please ensure the ag-Grid Enterprise Module @ag-grid-enterprise/server-side-row-model is registered.';
    

提交回复
热议问题