~/talk

Jest - RAM Eater

Talkat React Nexus 2025 · 2025-07-03..07-05· [testing, developer-experience]
slides:none on file

Jest consumes huge RAM on a multi-year monorepo (roughly a 2GB codebase) because Babel transpiles many files into large strings evaluated at runtime, GraphQL autmocking recreates a massive single-file API for each test, and Node v16–18 has memory regressions that push pipeline time from ~1h to 1.5–2h and require 16–32GB Node options. Fixes: replace Babel with swc transformer (rewriting some plugins), remove bulky HTML snapshots, split the GraphQL schema and use sharded GraphQL mocks with annotations, and wait for Node 20 fixes.

AI-written summary · about

  1. 0:00Introduction and speaker intro
  2. 1:05Case study background
  3. 3:35Why Jest was chosen
  4. 5:23Testing as system engineering
  5. 7:52Snapshot and mocking issues
  6. 8:32Babel and RAM usage problem
  7. 9:55Solution with SWC
  8. 10:37GraphQL automocking challenge
  9. 11:39Sharding GraphQL APIs
  10. 12:01Node.js version upgrade impact
  11. 12:42Conclusion and Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.