processing / processing/p5.js-web-editor
Enhancement: Separate Unit and Integration Test Scripts in package.json
@clairep94 is already working on this.
Since Sep 18, 2026.
- 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.
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.