Improve readability of test setup and assertions

This commit is contained in:
Matt Isenhower
2026-09-07 17:52:50 -07:00
parent 9971afe2e8
commit a1e934d0bd
27 changed files with 1223 additions and 245 deletions

View File

@@ -3,6 +3,7 @@ import assert from 'node:assert/strict';
import { nextDataRefreshAt } from '../src/common/dataRefresh.js';
const at = time => Date.parse(`2026-09-07T${time}Z`);
test('a late hourly publication is picked up again without waiting another hour', () => {
assert.equal(nextDataRefreshAt(at('10:00:10'), 0), at('10:00:25'));
assert.equal(nextDataRefreshAt(at('10:00:40'), 0), at('10:01:25'));