DhanushNehru / DhanushNehru/lockcheck
Add a native test suite (Node.js test runner)
- Dominant language
- JavaScript
- Stars
- 11
- Forks
- 3
- Avg merge
- 43m
- Merged PRs (30d)
- 1
Description
As we add more parsers (Yarn, Bun) and complex analyzers, we need automated tests to ensure we don't break existing logic.
Since `lockcheck` is strictly a **zero-dependency** project, we cannot install Jest, Mocha, or Vitest. We need to implement a test suite using the built-in Native Node.js Test Runner (`node:test` and `node:assert`).
**Acceptance Criteria:**
- Create a `test/` directory.
- Write unit tests for `levenshtein.js`, `semver.js`, and at least one analyzer (like `typosquat.js`).
- Add an `npm run test` command that executes `node --test`.
- The tests should pass cleanly without needing any network requests.
Contributor guide
Assessment
This issue has not been assessed yet.