Silenced ts errors on chart tests

This commit is contained in:
Alejandro Celaya
2022-03-07 18:06:28 +01:00
parent 45c6d3996e
commit 2b59d02ed9
3 changed files with 8 additions and 8 deletions

View File

@@ -19,9 +19,9 @@ describe('<DoughnutChart />', () => {
expect(doughnut).toHaveLength(1);
const { labels, datasets } = doughnut.prop('data');
const { labels, datasets } = doughnut.prop('data') as any;
const [{ data, backgroundColor, borderColor }] = datasets;
const { plugins, scales } = doughnut.prop('options') ?? {};
const { plugins, scales } = (doughnut.prop('options') ?? {}) as any;
expect(labels).toEqual(keys(stats));
expect(data).toEqual(values(stats));