| name | js-tests |
| description | Run JavaScript/TypeScript Jest unit tests. Use when asked to run JS tests, Jest tests, or frontend unit tests. |
Running JS Tests
Uses Jest. Run from repo root.
Commands
npm run test:unit
npm run test:unit -- --testPathPattern="plugins/ui"
npm run test:unit -- plugins/ui/src/js/src/layout/LayoutUtils.test.tsx
npm run test:unit -- --testNamePattern="should render"
npm run test:lint
Watch mode (during development)
npm run test -- --testPathPattern="plugins/ui"
Notes
- Run
npm install first if dependencies not installed
- Test files are
*.test.tsx or *.test.ts in plugins/*/src/js/