Skip to content

Commit 8fb4ee8

Browse files
committed
test(*): make function async #4908
1 parent 461323d commit 8fb4ee8

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

projects/igniteui-angular/src/lib/services/csv/csv-exporter-grid.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ describe('CSV Grid Exporter', () => {
5454
it('should export grid as displayed.', async () => {
5555
const currentGrid: IgxGridComponent = null;
5656

57-
TestMethods.testRawData(currentGrid, async (grid) => {
57+
await TestMethods.testRawData(currentGrid, async (grid) => {
5858
const wrapper = await getExportedData(grid, options);
5959
wrapper.verifyData(wrapper.simpleGridData);
6060
});

projects/igniteui-angular/src/lib/services/excel/excel-exporter-grid.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ describe('Excel Exporter', () => {
6161

6262
it('should export grid as displayed.', async () => {
6363
const currentGrid: IgxGridComponent = null;
64-
TestMethods.testRawData(currentGrid, async (grid) => {
64+
await TestMethods.testRawData(currentGrid, async (grid) => {
6565
await exportAndVerify(grid, options, actualData.simpleGridData);
6666
});
6767
});

projects/igniteui-angular/src/lib/services/exporter-common/test-methods.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ import { IgxStringFilteringOperand } from '../../data-operations/filtering-condi
66

77
export class TestMethods {
88

9-
public static testRawData(myGrid: IgxGridComponent, action: (grid) => void) {
9+
public static async testRawData(myGrid: IgxGridComponent, action: (grid) => Promise<void>) {
1010
const fix = TestBed.createComponent(GridIDNameJobTitleComponent);
1111
fix.detectChanges();
1212
myGrid = fix.componentInstance.grid;
1313

1414
expect(myGrid.rowList.length).toEqual(10, 'Invalid number of rows initialized!');
15-
action(myGrid);
15+
await action(myGrid);
1616
}
1717

1818
/* Creates an instance of GridDeclarationComponent; If filterParams is not specified,

0 commit comments

Comments
 (0)