timing.js 232 B

1234567891011121314
  1. 'use strict';
  2. var test = require('../');
  3. test('timing test', function (t) {
  4. t.plan(2);
  5. t.equal(typeof Date.now, 'function');
  6. var start = new Date();
  7. setTimeout(function () {
  8. t.equal(new Date() - start, 100);
  9. }, 100);
  10. });