File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -3,10 +3,8 @@ import { mount } from '@vue/test-utils';
33import MockDate from 'mockdate' ;
44import dayjs from 'dayjs' ;
55import antd from 'ant-design-vue' ;
6- import utc from 'dayjs/plugin/utc' ;
76import { sleep } from '../utils' ;
87
9- dayjs . extend ( utc ) ;
108export default function demoTest ( component , options = { } ) {
119 const suffix = options . suffix || 'vue' ;
1210 const files = glob . sync ( `./components/${ component } /demo/*.${ suffix } ` ) ;
@@ -20,7 +18,7 @@ export default function demoTest(component, options = {}) {
2018 testMethod = test . skip ;
2119 }
2220 testMethod ( `renders ${ file } correctly` , async ( ) => {
23- MockDate . set ( dayjs . utc ( '2016-11-22 ' ) . valueOf ( ) ) ;
21+ MockDate . set ( dayjs ( '2016-11-22T00:00:00Z ' ) . valueOf ( ) ) ;
2422 const demo = require ( `../.${ file } ` ) . default || require ( `../.${ file } ` ) ;
2523 document . body . innerHTML = '' ;
2624 const wrapper = mount ( demo , { global : { plugins : [ antd ] } , attachTo : document . body } ) ;
You can’t perform that action at this time.
0 commit comments