now

说明

获取1970至今的毫秒数

源码

用法

now.test.ts
1
import { now } from "../../utility/date/now";
2
3
describe('now', () => {
4
test('now should return a timestamp like `Date.now()` and `new Date().getTime()`', () => {
5
const expected = {
6
type: 'number',
7
};
8
9
const result = now();
10
11
expect(typeof result).toBe(expected.type);
12
})
13
})
Copied!
最近更新 1yr ago
复制链接