#230 into release@5.0.0 🧊 fix timer for test#239
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
| vi.useFakeTimers().setSystemTime(new Date('1999-03-12')); | ||
|
|
||
| describe('formatTimestamp', () => { | ||
| it('Should correctly format timestamp', () => { | ||
| expect(formatTimestamp(1735623296789)).toBe('31.12.2024, 12:34:56,789'); | ||
| expect(formatTimestamp(944199296789)).toBe('03.12.1999, 12:34:56,789'); |
There was a problem hiding this comment.
Это по факту не лечит проблему, это лишь сдвигает date.now (таймстамп), но проблема не в таймстампе, а в том, как он отображается — один и тот же таймстамп отображается по разному в разных часовых поясах.
TZ=Europe/Berlin yarn unit-test src/utils/helpers/date/formatTimestamp/formatTimestamp.test.ts если запустить тест, то можно увидеть, что проблема все еще актуальна.
Короче, я думаю надо просто в vitest конфиг запихать переменную окружения TZ
No description provided.