Testing & QA
Bug Report
Flaky test fails only on the 31st: month arithmetic with the real clock
A billing test passed for weeks and failed this morning, 31 January, for every engineer at once. JavaScript's setMonth rolled 31 January into 3 March, and the test read the real clock. We fixed the arithmetic, injected the clock and added property tests over every day.