Build your own test runner
summary
Live codes a mocha-like test runner in Node that actually requires test files registers global it functions and runs callbacks inside try catch. Uses the expect assertion library for diffs, wires events with Node’s EventEmitter-based reporter, formats output with chalk, and builds a small CLI that counts passing and failing tests (the demo uses two tests) and emits colored pass/fail lines plus a summary so the runner demonstrably works end to end.
AI-written summary · about
chapters (8)
- 0:00Start
- 3:49To Build a Test Runner
- 8:18Test File
- 12:11Recap
- 15:24Create the Emitter
- 18:33Colors
- 21:24Passing Tests
- 22:41Green Tests
related talks
27mBuilt-in Tests with Node.js
37mTesting in the Node.js World
31mGreat Expectations – Understanding nodejs Testing Frameworks
45mAutomated Testing JavaScript
25mMaking JavaScript Tests Fast, Easy, and Friendly
27mAutomated Testing for the Modern Web
02h 35mTesting from 0 to 100
14mDebugging Secrets of a Lazy Developer
