wip: code formatting nits continued

This commit is contained in:
jdalton
2023-09-16 22:59:56 -07:00
parent 0b28b7f7b6
commit b5c59317ea
421 changed files with 7354 additions and 9005 deletions

25
test/now.spec.js Normal file
View File

@@ -0,0 +1,25 @@
import { _, stubA } from './utils';
describe('now', () => {
it('should return the number of milliseconds that have elapsed since the Unix epoch', (done) => {
const stamp = +new Date();
const actual = _.now();
expect(actual >= stamp);
setTimeout(() => {
expect(_.now() > actual);
done();
}, 32);
});
it('should work with mocked `Date.now`', () => {
const now = Date.now;
Date.now = stubA;
const actual = _.now();
Date.now = now;
expect(actual).toBe('a');
});
});