TLDR Web Dev · ARTICLES & TUTORIALS
USING THE NODE 18+ NATIVE TEST RUNNER WITH TYPESCRIPT AND REACT
Summary from the TLDR Web Dev newsletter
Node.js 18 introduced a native test runner that can replace Jest, Mocha, or Vitest for basic testing scenarios, including TypeScript and React component testing. The setup requires minimal configuration with experimental flags for TypeScript support and module mocking, plus dependencies like `tsx`, `global-jsdom`, and `@testing-library/react`. While it has advantages like no config files and a smaller dependency footprint, it has limitations like having a smaller ecosystem compared to established testing frameworks.