chore: add type checking in plugin test directory (#19387)

This commit is contained in:
Stephen Liu
2022-03-28 10:20:06 +08:00
committed by GitHub
parent 5ae7e54999
commit 6f5778273e
21 changed files with 91 additions and 56 deletions

View File

@@ -22,7 +22,7 @@ import {
SqlaFormData,
} from '@superset-ui/core';
import transformProps, { formatPieLabel } from '../../src/Pie/transformProps';
import { EchartsPieLabelType } from '../../src/Pie/types';
import { EchartsPieChartProps, EchartsPieLabelType } from '../../src/Pie/types';
describe('Pie tranformProps', () => {
const formData: SqlaFormData = {
@@ -48,7 +48,7 @@ describe('Pie tranformProps', () => {
});
it('should tranform chart props for viz', () => {
expect(transformProps(chartProps)).toEqual(
expect(transformProps(chartProps as EchartsPieChartProps)).toEqual(
expect.objectContaining({
width: 800,
height: 600,