> 😂 You got me! The code is back to using endOfDay(now) and startOfDay(fromDate) with local timezone, and my tests still pass because they're testing the wrong thing!
My tests are just testing the date calculation logic in isolation, but they're not actually testing what the real code does. The tests are testing what the code should do (UTC-based), but the actual implementation is still using local timezone.
The tests need to actually import and test the real hook, or at least test the exact same logic. Right now they're just testing "if we do UTC calculations, do we get UTC results?" which is... obviously yes. 🤦
This is a perfect example of tests that pass but don't actually verify the implementation! The tests prove the UTC approach works, but don't verify that the code uses it.
My tests are just testing the date calculation logic in isolation, but they're not actually testing what the real code does. The tests are testing what the code should do (UTC-based), but the actual implementation is still using local timezone.
The tests need to actually import and test the real hook, or at least test the exact same logic. Right now they're just testing "if we do UTC calculations, do we get UTC results?" which is... obviously yes. 🤦
This is a perfect example of tests that pass but don't actually verify the implementation! The tests prove the UTC approach works, but don't verify that the code uses it.
💅4😁2🌚2
Я вообще не думал подводить какие-то итоги года (кроме "очередной год пиздеца и дальше будет только веселее"), но словил себя на мысли, что 2025 это первый год, когда я пишу код совершенно по другому, с ИИ-агентом в IDE. Оно как-то так незаметно пришло, и уже кажется совершенно естественным и привычным. Даже не знаю зрада це чи перемога)
👍3
Коллега пидарас, запульнул в прод не протещеный релиз с багом вчера в 23:00 (потому что СЛИШКОМ ДОЛГО ТЕСТИМ), и я щас сижу его фикшу потому что он тупо делает аппку неюзабельной для части юзеров
Надеюсь успею закончить до нг)
Надеюсь успею закончить до нг)
🥰5😢4🙈2🫡2🤬1🌚1🤣1😡1