processing / processing/p5.js-web-editor

Enhancement: Separate Unit and Integration Test Scripts in package.json

Open
#3,998 3 comments 0 reactions 1 assignee View on GitHub

@clairep94 is already working on this.

Since Sep 18, 2026.

Awaiting Maintainer Approval Feature Request
Dominant language
JavaScript
Stars
1.7k
Forks
1.7k
Avg merge
3d 4h
Merged PRs (30d)
8

Description

Increasing Access

Separating unit and integration test scripts could improve the developer experience for contributors interacting with the test suite.

Currently all tests are executed using a single command (npm run test). Introducing clearer scripts for different test scopes would help contributors understand how tests are organized and how they should run them during development.

This can lower the barrier for new contributors by making the testing workflow easier to understand and by clarifying where different types of tests should live in the project.

Image
Feature request details

Summary

Currently the project runs tests using a single script:

npm run test

which maps to:

"test": "NODE_ENV=test jest"

This executes all tests together without distinguishing between unit tests and integration tests.

Context

I understand that the project may still need additional tests in different areas and that expanding the test suite is an ongoing effort.

However, even with the current test coverage, introducing clearer testing scripts could help improve contributor understanding of the testing structure and how tests should be executed during development.

Proposed Enhancement

Introduce separate npm scripts for different types of tests.

Example structure:

"scripts": {
  "test": "npm run test:all",
  "test:unit": "NODE_ENV=test jest tests/unit",
  "test:integration": "NODE_ENV=test jest tests/integration",
  "test:all": "npm run test:unit && npm run test:integration",
  "test:watch": "NODE_ENV=test jest --watch",
  "test:ci": "npm run lint && npm run test:all"
}

This would allow contributors to run:

npm run test:unit
npm run test:integration
npm run test

Benefits

• Improves clarity for contributors about how tests are structured
• Makes it easier to run specific categories of tests during development
• Helps contributors understand where new tests should be added
• Provides a scalable foundation if more tests (such as integration or E2E tests) are added later

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.