Files
superset2/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/test/transformProps.test.ts
hainenber dde131eba0 chore: add unit test
Signed-off-by: hainenber <dotronghai96@gmail.com>
2026-07-28 22:01:19 +07:00

23 lines
614 B
TypeScript

import { ChartProps } from '@superset-ui/core';
import transformProps from '../src/transformProps';
const createProps = () =>
({
width: 800,
height: 600,
formData: {
includeSeries: false,
linearColorScheme: 'superset_seq_1',
metrics: undefined,
secondaryMetric: 'sum__SP_POP_TOTL',
series: 'country_name',
showDatatable: false,
},
queriesData: [{ data: [{ country_id: 'FRA', metric: 10 }] }],
theme: {},
}) as unknown as ChartProps;
test('do not crash on undefined metrics', () => {
expect(() => transformProps(createProps())).not.toThrow();
});