- Conversion engine (Vitest) — 100+ unit tests in
src/utils/conversions.test.tscover every function exported fromsrc/utils/conversions.ts:- Base conversions — binary, hexadecimal, decimal, octal (all directions).
- Encodings — ASCII ⇄ hex/binary, BCD, Gray code.
- Advanced numerics — signed/unsigned (8/16/32/64-bit), Base-N (2–36), and IEEE 754 single/double precision.
- Edge cases — empty input, whitespace handling,
0xprefixes, arbitrary-precision values, and invalid-input error messages.
- Release tooling (Vitest) —
scripts/bump-version.test.mjscovers the version-bump script: semver parsing/comparison, version-field rewrites, and changelog reshaping.
npm run test # Run the full suite once (vitest run)To watch files while developing, run Vitest directly:
npx vitest # Re-run affected tests on change- Tests run on the default Vitest Node environment — the conversion engine is pure TypeScript with no DOM dependency, so no jsdom is needed.
- Add new tests next to the code they cover, as
*.test.tsfiles undersrc/. - When you add a conversion, add cases for valid input, edge cases, and invalid input that should throw — see CONTRIBUTING.md.
- Prefer deterministic assertions; avoid relying on time or randomness.