@@ -5,7 +5,7 @@ import dateFnsGenerateConfig from '../src/generate/dateFns';
55import { getMoment } from './util/commonUtil' ;
66
77import 'dayjs/locale/zh-cn' ;
8- import { GenerateConfig } from '../src/generate' ;
8+ import type { GenerateConfig } from '../src/generate' ;
99
1010describe ( 'Picker.Generate' , ( ) => {
1111 beforeAll ( ( ) => {
@@ -80,7 +80,7 @@ describe('Picker.Generate', () => {
8080 describe ( 'locale' , ( ) => {
8181 describe ( 'parse' , ( ) => {
8282 it ( 'basic' , ( ) => {
83- [ '2000-01-02' , '02/01/2000' ] . forEach ( str => {
83+ [ '2000-01-02' , '02/01/2000' ] . forEach ( ( str ) => {
8484 const date = generateConfig . locale . parse ( 'en_US' , str , [ 'YYYY-MM-DD' , 'DD/MM/YYYY' ] ) ;
8585
8686 expect ( generateConfig . locale . format ( 'en_US' , date ! , 'YYYY-MM-DD' ) ) . toEqual (
@@ -247,3 +247,12 @@ describe('Generate:moment', () => {
247247 expect ( now . locale ( ) ) . toEqual ( 'zh-cn' ) ;
248248 } ) ;
249249} ) ;
250+
251+ describe ( 'Generate:dayjs' , ( ) => {
252+ it ( 'getFixedDate' , ( ) => {
253+ const timea = dayjsGenerateConfig . getFixedDate ( '2019-2-08' ) ;
254+ const timeb = dayjsGenerateConfig . getFixedDate ( '2019-02-08' ) ;
255+ expect ( timea . isValid ( ) ) . toBeTruthy ( ) ;
256+ expect ( timea . valueOf ( ) ) . toEqual ( timeb . valueOf ( ) ) ;
257+ } ) ;
258+ } ) ;
0 commit comments