Skip to content

Testing

Akram El Assas edited this page Jul 3, 2025 · 3 revisions

This page covers the testing strategy and practices used in wexCommerce to ensure code quality, stability, and reliability across all components.

Integration Tests and Coverage

If coverage upload fails during CI, the workflow still succeeds but the repository owner is notified automatically via email through the creation of a hidden issue on GitHub. This ensures awareness without blocking deployments.

You can find more details about integration tests here.

Manual Tests

  • Manual testing procedures are documented and used for complex flows or UI interactions that require human verification.
  • Includes exploratory testing and user acceptance tests before major releases.

You can find more details about manual tests here.

Pre-commit Checks with Husky

  • To maintain code quality, wexCommerce uses Husky pre-commit hooks that run:
    • ESLint for code style and syntax
    • TypeScript type checking to catch type errors early
    • File size checks to avoid large file commits
  • The pre-commit script is located at /pre-commit.js in the root directory.
  • These checks help catch errors before code is committed and pushed.

Running Tests Locally

To run all tests locally, use:

cd ./backend
npm run test

Continuous Integration

  • Tests are run automatically on each push via GitHub Actions workflows.
  • The CI system runs tests for backend.

For more detailed information and guidelines on writing tests, please refer to the wexCommerce Contribution Guide.

Clone this wiki locally