Skip to content

Commit 9dc04a1

Browse files
test(common): restore unrelated timezone test context
1 parent 7139d00 commit 9dc04a1

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎common/src/__tests__/freebuff-peak-hours.test.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ describe('every window names the clock it is quoted in', () => {
132132
insideWindow,
133133
'Europe/Berlin',
134134
)
135+
// The whole bug in one assertion: the digits differ from the UTC rendering,
136+
// so a string that named no zone was wrong for this reader by two hours.
135137
expect(berlin).toContain('12:00 PM')
136138
expect(berlin).not.toContain('10:00 AM')
137139
expect(berlin).toMatch(/GMT\+2|CEST/)
@@ -150,6 +152,9 @@ describe('every window names the clock it is quoted in', () => {
150152
})
151153

152154
test('an unknown zone falls back to UTC rather than to the host process', () => {
155+
// `timeZone: undefined` resolves to whatever the PROCESS runs in, which is
156+
// the reader in a browser and a Render container on the server. Only the
157+
// explicit argument is deterministic, which is why the server passes one.
153158
expect(formatDeepSeekExpensiveWindowReturn(insideWindow, 'UTC')).toBe(
154159
formatDeepSeekExpensiveWindowReturn(insideWindow, 'Etc/UTC'),
155160
)

0 commit comments

Comments
 (0)