Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
sai6855 committed Jun 3, 2024
1 parent a7f4bea commit 99f6023
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions packages/x-data-grid/src/tests/DataGrid.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,18 @@ describe('<DataGrid />', () => {
<DataGrid
rows={rows}
columns={columns}
{...Object.keys(DATA_GRID_PROPS_DEFAULT_VALUES).reduce((acc, key) => {
// @ts-ignore
acc[key] = undefined;
{...(
Object.keys(DATA_GRID_PROPS_DEFAULT_VALUES) as Array<
keyof typeof DATA_GRID_PROPS_DEFAULT_VALUES
>
).reduce((acc, key) => {
if (Array.isArray(DATA_GRID_PROPS_DEFAULT_VALUES[key])) {
// @ts-ignore
acc[key] = [];
} else {
// @ts-ignore
acc[key] = undefined;
}
return acc;
}, {})}
/>,
Expand Down

0 comments on commit 99f6023

Please sign in to comment.