File: es.date.now.js

package info (click to toggle)
node-core-js 3.33.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 18,828 kB
  • sloc: javascript: 87,204; makefile: 13
file content (10 lines) | stat: -rw-r--r-- 350 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
QUnit.test('Date.now', assert => {
  const { now } = Date;
  assert.isFunction(now);
  assert.arity(now, 0);
  assert.name(now, 'now');
  assert.looksNative(now);
  assert.nonEnumerable(Date, 'now');
  // eslint-disable-next-line unicorn/prefer-date-now -- required for testing
  assert.epsilon(+new Date(), now(), 10, 'Date.now() ~ +new Date');
});