Skip to content

Commit

Permalink
✅ test: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Feb 2, 2022
1 parent 65a90b7 commit f825dd8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion jest.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const path = require('path');

module.exports = {
...defaultConfig,
setupFiles: [...defaultConfig.setupFiles],
setupFiles: [...defaultConfig.setupFiles, './tests/setup.ts'],
moduleNameMapper: {
'@arvinxu/asset-gallery': '<rootDir>/packages/asset-gallery/src',
'@arvinxu/preloader': '<rootDir>/packages/preloader/src',
Expand Down
2 changes: 1 addition & 1 deletion packages/heatmap-calendar/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import type { FC } from 'react';
import { Heatmap } from '@ant-design/charts';
import type { HeatmapConfig } from '@ant-design/charts/es/heatmap';
import type { HeatmapConfig } from '@ant-design/charts';
import type { HeatmapCalendarData } from './type';

import { useDarkTheme } from './hooks';
Expand Down
2 changes: 1 addition & 1 deletion packages/journey-map/src/Chart/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { FC } from 'react';
import React, { useContext } from 'react';
import type { AreaConfig } from '@ant-design/charts/es/area';
import type { AreaConfig } from '@ant-design/charts';
import { Area } from '@ant-design/charts';
import { blue } from '@ant-design/colors';

Expand Down
2 changes: 1 addition & 1 deletion packages/sortable-list/src/types/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export interface SortableListProps<T>
* 变更值
* @param value
*/
onChange: (value: T) => void;
onChange?: (value: T) => void;
/**
* 是否限制拖拽轴
*/
Expand Down
4 changes: 4 additions & 0 deletions tests/setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
function noOp() {}
if (typeof window.URL.createObjectURL === 'undefined') {
Object.defineProperty(window.URL, 'createObjectURL', { value: noOp });
}

0 comments on commit f825dd8

Please sign in to comment.