discussion:make testing.md more concise and decision-oriented for contributors
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Documentazione
- Chiarezza
- Da chiarire
- Stato di attività
- Tranquilla
- Stack tecnologico
- javascript
- Ambito
- documentation, testing
Direzione di ricerca
Inizia leggendo testing.md e confrontando l’organizzazione documentata dei test lato client con il pattern test/ lato server descritto nell’issue. Conferma l’approccio preferito con i maintainers prima di modificare qualsiasi cosa; il risultato dovrebbe essere una guida concisa e orientata alle decisioni che spieghi chiaramente la posizione accettata dei test e i passaggi successivi per i contributors.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Increasing Access
While working across both the client and server codebases, I noticed that the repository currently follows two different test organization models, but only one of them is documented.
Client-side (documented): tests colocated adjacent to source files
Server-side (undocumented): tests grouped inside a dedicated test/ folder per module
Based on hands-on contribution experience, I strongly lean toward the server-style test-folder model as a more scalable and contributor-friendly approach, especially for larger directories.
Feature request details
Why this matters (practical impact)
In several client component directories, there are 20–25 files, where test and story files are mixed directly with production code. This has a few concrete downsides:
- Contributors must repeatedly scan past test files to locate actual components
- It becomes harder to visually distinguish production code vs test code
- Directory navigation cost increases as the project grows
- New contributors face higher cognitive load when exploring the codebase
By contrast, the server-side pattern:
module/
controller.js
service.js
test/
controller.test.js
service.test.js
keeps production code immediately visible, while still maintaining strong test coverage.
This suggests the repository already has a proven, scalable testing model in use — just not consistently documented or discussed.
Documentation concern (testing.md)
Another related observation is that testing.md is currently very long (~550 lines) and highly procedural. While thorough, it can be overwhelming for contributors who just want to answer:
- Where should I put my test?
- What pattern should I follow in this part of the codebase?
This makes it harder to quickly internalize expectations, especially for first-time contributors.
There may be an opportunity to:
- Make the document more precise and decision-oriented
- Clearly explain accepted test organization patterns
- Reduce cognitive overhead without removing useful detail
Discussion points / questions
I’d love maintainer input on the following:
-
Is the server-style
test/folder considered a preferred or more scalable pattern going forward? -
Would it make sense to explicitly support and document this model, at least for larger modules or new code?
-
Should
testing.mddistinguish between:- Small components (adjacent tests acceptable)
- Larger modules (grouped test folders recommended)?
-
Is there interest in making
testing.mdmore concise and guidance-focused, possibly with a short “Quick Start / Best Practices” section?
Maintainers (@raclim ) wdyt?
- Lingua principale
- JavaScript
- Stelle
- 1.7k
- Fork
- 1.7k
- Merge medio
- 3g 18h
- PR unite (30g)
- 7
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di processing/p5.js-web-editor
-
`PATCH /editor/project/visibility` returns 200 with `null` and doesn't update when `projectId` is a slugForse già presa @Prbhtsgh l’ha presa 1 giorno fa. ApertaAwaiting Maintainer Approval Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
processing/p5.js-web-editor#4348 · 3 commenti ·
I maintainer di solito rispondono entro 3 giorni
-
Fix: example.js stores defaultHTML function reference instead of calling it, causing examples to display raw JavaScript source in previewForse già presa @syedbarkath980 l’ha presa 5 giorni fa. ApertaAwaiting Maintainer Approval Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
processing/p5.js-web-editor#4344 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
signup form gets stuck when signup request fails due to network errorForse già presa @PS01K l’ha presa 35 giorni fa. ApertaAwaiting Maintainer Approval Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
processing/p5.js-web-editor#4285 · 3 commenti ·
I maintainer di solito rispondono entro 3 giorni
-
saveProject throws an error when a network request failsForse già presa @dyk1454683243-sudo l’ha presa 7 giorni fa. ApertaBug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
processing/p5.js-web-editor#4276 · 3 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 3 giorni
-
Awaiting Maintainer Approval Enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
processing/p5.js-web-editor#4270 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di processing/p5.js-web-editor
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
no-human-ai/no_human#659 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] Multi-day events show "Ended" while still in progressForse già presa @tarunagnihotri534 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
data-umbrella/du-event-board#231 · 2 commenti ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
-
IO.get_env on Node truncates names at embedded NULForse già presa @Yi-111-a l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
HigherOrderCO/Bend#1449 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
cryptpad/documentation#162 ·