Page MenuHomePhabricator

Add a Vitest unit test suite
Open, Needs TriagePublic

Description

Automated tests help prevent regressions, improve code quality, and make it easier for contributors to develop and refactor Clip2Commons with confidence.

The repository currently does not include an automated unit test suite.

An initial test suite using '''Vitest''' should be added to cover core functionality such as:

  • Utility functions
  • Metadata validation
  • Browser capability detection
  • Upload and encoding logic where practical
  • Other reusable modules that can be tested independently

Acceptance criteria:

  • Configure Vitest for the project.
  • Add documentation describing how to run the test suite locally.
  • Add an initial set of unit tests covering the project's core modules.
  • Ensure tests can be executed automatically as part of future continuous integration workflows.