~/talk

Node js in 2023 - What’s New in the Node.js Native Test Runner

Talkat revo.js 2023 · 2023-10-04..10-06· [nodejs, testing]
slides:none on file

Node.js now ships a native test runner, stable and backported to Node 18 LTS, that claims 10x faster than Jest by using internal async tracing via AsyncLocalStorage-based tracing and TAP output with built-in reporters (spec, tap, junit). It provides per-test mock contexts that auto-reset, a fake-timers implementation using a priority-queue for much faster time advancement, experimental test coverage via --experimental-test-coverage, file-level parallelization, abortable network requests, and tips for finding leaked handles.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 1:04History of Node.js test runner
  3. 2:53Why native test runner
  4. 6:08Recreating test runner from scratch
  5. 7:57Async local storage tracking
  6. 10:53Stable release and TAP protocol
  7. 11:39Snapshot testing evolution
  8. 13:02Mocking with new API
  9. 14:50Fake timers implementation
  10. 18:45Request aborting and reporters
  11. 20:31Code coverage integration
  12. 21:12Test sharding and concurrency
  13. 22:34Using protocol for cleanup
  14. 23:40Future discussions and retries
  15. 24:44Practical tips for testing
  16. 26:30Debugging flaky tests
  17. 27:57Conclusion and resources
~/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.