Skip to content

Add comprehensive unit tests and CI workflow #82

Description

@naheel0

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingciCIenhancementNew feature or requesthigh-priorityHigh-priority worktestTest related

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions