SShortSingh.
Back to feed

Migrating from Jest to Vitest: why a written spec mattered even for a mechanical change

0
·1 views

A design system team replaced Jest with Vitest, since their Vite-based setup, including Storybook, already ran a separate transform pipeline for tests. Before changing any tests, the author wrote a spec that inventoried the codebase: 68 test files, roughly 120 jest.fn calls, 15 jest.mock calls, and one file using fake timers. The spec also listed non-goals, such as not migrating untested legacy packages and not changing the jsdom environment, and defined done as all tests passing with unchanged assertions and five dependencies removed. The migration took about two days and was delivered as five small commits. The author argues that a clear non-goals list is what keeps a mechanical migration from expanding into a rewrite.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingHacker News ·

AMD Details Zen 6 Family Focus on Feeding Its Cores

A Chips and Cheese analysis examines AMD's upcoming Zen 6 processor family and how it is designed to keep its execution cores supplied with data. The piece centers on the memory and cache subsystem, which determines how effectively the processor avoids stalls. It is drawn from a technical write-up posted to Hacker News, where it gathered modest early attention. The source provides only the article link and discussion metrics, so specific architectural figures are not reflected in this summary.

0
ProgrammingHacker News ·

Neil Fraser Reports the .name Domain Has Been Grandfathered

A post on neil.fraser.name, dated November 10, 2026, discusses the status of the .name top-level domain as having been grandfathered. The item was shared on Hacker News, where it received 26 points and 3 comments. The source text available is limited to the link and discussion metadata, so the full details of the grandfathering decision are not confirmed here. Readers are directed to the original post for the author's complete account.

0
ProgrammingHacker News ·

Tailscale's DNS IPv6 address reportedly spells out the company name

A Reddit post in the Tailscale community highlights that the IPv6 address used for Tailscale's DNS resolves to a pattern that spells out the word 'Tailscale'. The discovery was shared as an Easter egg and drew attention on Hacker News, where it gathered 17 points and 7 comments. The post appears to be a community observation rather than an official company announcement. The source material provides limited detail beyond the link and engagement figures, so the exact address and any official response are not confirmed here.

0
ProgrammingDEV Community ·

Random UUIDv4 Primary Keys Can Silently Degrade Database Write Performance

A backend engineer reported a 340% spike in database write latency after their table passed 50 million rows, with CPU usage normal and storage I/O saturated. The cause was using random UUIDv4 values as primary keys, which were chosen to avoid enumeration attacks and simplify distributed ID generation. Relational databases store primary keys in sorted B-Tree indexes, so random keys land in arbitrary positions, forcing cold page reads, frequent page splits, and bloated, half-empty index pages. The problem is worse in MySQL's InnoDB, where the primary key also determines physical row order, fragmenting the entire table. The author benchmarks UUIDv4 against the time-ordered UUIDv7 standard, which places a timestamp first so new keys append near the end of the index.