Rethinking JavaScript Test Coverage
summary
Node gains native runtime coverage via V8 built-in coverage exposed through an env var and turned into readable reports by c8 or NYC. Instrumentation-free collection runs about three to four times faster than transpile-and-rewrite on the Node core. Nightly combined Windows+Linux reports reveal hotspots and gaps (examples: a line hit 22,300 times, a test run example rising from 50% to 100%), and the system is already used to guide contributions.
AI-written summary · about
chapters (12)
- 0:00Intro
- 1:49Today I'm talking about Code Coverage
- 2:32What is code coverage?
- 4:18What's happened since 1962?
- 5:22Coverage tools in Node.js
- 6:59What is code coverage ?
- 11:50It's not just about writing tests
- 12:46How code coverage works?
- 13:38Adding counters to code
- 15:24Enabling coverage in the VM
- 20:28How can I set sail on this coverage train?
- 24:05Goodbye everybody
related talks
29mNode js in 2023 - What’s New in the Node.js Native Test Runner
31mGreat Expectations – Understanding nodejs Testing Frameworks
34mNode.js Can Be as Fast as C++
48mV8 Meets the Enemy
17mV8 engine, JS Code Interpretation, and Execution
22mWe got your code, covered!
23mJoin the super secret V8 club & become a JavaScriptbender
27mBuilt-in Tests with Node.js
