Testing
Testing is a core requirement for contributing to NDM. Every change — even small ones — must be covered by tests.
General Rules
Every change requires tests. No exceptions.
Rewrite outdated tests. If an existing test no longer reflects the current behavior, update it.
Add new tests for new features. All new logic must be fully covered.
Do not leave commented‑out tests. Remove unused test code.
Vitest
NDM uses Vitest because it has a wide ecosystem, fast performance, and excellent compatibility with modern TypeScript tooling.
Running Tests
pnpm test
Watching Tests
pnpm test:watch
Vitest integrates seamlessly with the project structure and supports snapshot testing, mocking, coverage reports, and more.