Blame view

天文台pc/tianwentai-ui/node_modules/react-day-picker/src/contexts/Modifiers/utils/getCustomModifiers.test.ts 383 Bytes
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
  import { DayModifiers } from 'index';
  
  import { getCustomModifiers } from './getCustomModifiers';
  
  describe('when some modifiers are not an array', () => {
    const date = new Date();
    const dayModifiers: DayModifiers = {
      foo: date
    };
    const result = getCustomModifiers(dayModifiers);
    test('should return as array', () => {
      expect(result.foo).toEqual([date]);
    });
  });