mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
13 lines
321 B
JavaScript
13 lines
321 B
JavaScript
import moment from 'moment';
|
|
import MockDate from 'mockdate';
|
|
|
|
export function setMockDate(dateString = '2017-09-18T03:30:07.795') {
|
|
MockDate.set(moment(dateString));
|
|
}
|
|
|
|
export function resetMockDate() {
|
|
MockDate.reset();
|
|
}
|
|
|
|
export const sleep = (timeout = 0) => new Promise(resolve => setTimeout(resolve, timeout));
|