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

@@ -16,11 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
import { ChartProps } from '@superset-ui/core';
import { ChartProps, SqlaFormData } from '@superset-ui/core';
import { EchartsBoxPlotChartProps } from '../../src/BoxPlot/types';
import transformProps from '../../src/BoxPlot/transformProps';
describe('BoxPlot tranformProps', () => {
const formData = {
const formData: SqlaFormData = {
datasource: '5__table',
granularity_sqla: 'ds',
time_grain_sqla: 'P1Y',
@@ -68,7 +69,7 @@ describe('BoxPlot tranformProps', () => {
});
it('should tranform chart props for viz', () => {
expect(transformProps(chartProps)).toEqual(
expect(transformProps(chartProps as EchartsBoxPlotChartProps)).toEqual(
expect.objectContaining({
width: 800,
height: 600,