feat: wayfinding system across chapters, HUD and project plates; cut boot log, headlight and ops strip
This commit is contained in:
@@ -1,21 +1,11 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { bucharestClock, uptimeSince } from '@/lib/operations';
|
||||
|
||||
describe('uptimeSince', () => {
|
||||
const start = new Date('2025-08-01T00:00:00Z');
|
||||
it('is zero at the start', () => {
|
||||
expect(uptimeSince(start, start)).toEqual({ months: 0, days: 0 });
|
||||
});
|
||||
it('counts whole months and remaining days', () => {
|
||||
expect(uptimeSince(start, new Date('2026-10-10T00:00:00Z'))).toEqual({ months: 14, days: 9 });
|
||||
});
|
||||
it('clamps to zero before the start', () => {
|
||||
expect(uptimeSince(start, new Date('2025-01-01T00:00:00Z'))).toEqual({ months: 0, days: 0 });
|
||||
});
|
||||
});
|
||||
import { bucharestClock } from '@/lib/operations';
|
||||
|
||||
describe('bucharestClock', () => {
|
||||
it('formats HH:MM in Europe/Bucharest', () => {
|
||||
expect(bucharestClock(new Date('2026-01-15T10:05:00Z'))).toBe('12:05');
|
||||
});
|
||||
it('follows daylight saving time', () => {
|
||||
expect(bucharestClock(new Date('2026-07-15T10:05:00Z'))).toBe('13:05');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user