DhanushNehru / DhanushNehru/lockcheck

Add a native test suite (Node.js test runner)

Open
#6 0 comments 0 reactions 0 assignees View on GitHub
documentation enhancement help wanted testing
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.