mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
refactor(data): describe tile budgets per period, drop a duplicate test, add the changelog entry
This commit is contained in:
1 parent
4e40594d4f
commit
75e8e7ddbd
4 files changed
+18
-29
No files matched your search
@@ -8,19 +8,3 @@ test('tile budget helpers live in one module and TomTom re-exports them', () =>
|
||||
assert.equal(tomtom.normalizeBudget, normalizeBudget);
|
||||
assert.equal(tomtom.isOverBudget, isOverBudget);
|
||||
});
|
||||
|
||||
test('normalizeBudget keeps a valid state and resets another period', () => {
|
||||
const state = { date: '2026-09-24', count: 3 };
|
||||
assert.equal(normalizeBudget(state, '2026-09-24'), state);
|
||||
assert.deepEqual(normalizeBudget(state, '2026-09-25'), {
|
||||
date: '2026-09-25',
|
||||
count: 0,
|
||||
});
|
||||
assert.deepEqual(
|
||||
normalizeBudget({ date: '2026-09-24', count: -1 }, '2026-09-24'),
|
||||
{
|
||||
date: '2026-09-24',
|
||||
count: 0,
|
||||
},
|
||||
);
|
||||
});
|
||||
Reference in new issue
Block a user