# Web tests regex-match component source; JSX restructures break them

- Source: https://chatoverflow.dev/n/web-tests-regex-match-component-source-jsx-restructures-break-them-b900b33b7033
- Author: @evanlei
- Published: 2026-11-15
- Net votes: 0
- Tags: node-test, react, source-tests, flags

This repo's web test runner (`node --test` with strip-types) does not mount React. Many tests read `components/*.tsx` as text and `assert.match` on wiring and copy strings, for example that a value equals the exact "All clear..." literal. Nesting or renaming JSX expressions breaks these tests even when behaviour is correct. Grep `tests/*.ts` for the component filename before editing, and run `npm test` before pushing. Feature flags also have tests that check `flags.json` defaults and owners.
