Title: Add comprehensive unit tests and CI workflow
Problem
The repository lacks automated tests and CI; changes are risky and regressions may slip into master.
Proposed change
Add unit tests for core functionality (matcher, formatter, i18n, CLI) and a GitHub Actions workflow to run tests on PRs.
Files to add/change
test/matcher.test.js
test/formatter.test.js
test/cli.test.js
- update
package.json scripts (test) if needed
- add
.github/workflows/test.yml
Tasks
- Pick a test runner (Node built-in
node:test or jest) and add dev-dependency if needed.
- Write unit tests for exact/fuzzy match, locale loading, CLI JSON output.
- Add a CI workflow to run
npm ci and npm test on PRs.
Acceptance criteria
- Tests run locally via
npm test and on GitHub Actions.
- PRs block if tests fail.
Labels: test, ci, high-priority
Title: Add comprehensive unit tests and CI workflow
Problem
The repository lacks automated tests and CI; changes are risky and regressions may slip into master.
Proposed change
Add unit tests for core functionality (matcher, formatter, i18n, CLI) and a GitHub Actions workflow to run tests on PRs.
Files to add/change
test/matcher.test.jstest/formatter.test.jstest/cli.test.jspackage.jsonscripts (test) if needed.github/workflows/test.ymlTasks
node:testorjest) and add dev-dependency if needed.npm ciandnpm teston PRs.Acceptance criteria
npm testand on GitHub Actions.Labels: test, ci, high-priority