LearnNewsExamplesServices
Frontmatter
id8881
titleEnhance Testing Guides with Practical Workflow & Safety Protocols
stateClosed
labels
documentationdeveloper-experienceaitesting
assigneestobiu
createdAtJan 26, 2026, 12:17 PM
updatedAtJan 26, 2026, 12:27 PM
githubUrlhttps://github.com/neomjs/neo/issues/8881
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJan 26, 2026, 12:27 PM

Enhance Testing Guides with Practical Workflow & Safety Protocols

Closed v11.24.0/archive-v11-24-0-chunk-1 documentationdeveloper-experienceaitesting
tobiu
tobiu commented on Jan 26, 2026, 12:17 PM

Context: The current testing guides (UnitTesting.md and ComponentTesting.md) provide a good architectural overview but lack practical "Day 1" developer experience details. We need to bridge the gap between "knowing the architecture" and "running the first test".

Missing Information & Required Updates:

  1. Running Specific Tests (The "Focus Mode"):

    • Explain how to run a single test file to avoid waiting for the full suite during development.
    • Command: npx playwright test test/playwright/unit/my/file.spec.mjs -c test/playwright/playwright.config.unit.mjs
    • Why: This is the standard workflow for TDD / debugging.
  2. The "Safety Net" (Cross-Test Side Effects):

    • Explicitly warn that running a single test is not enough before committing.
    • The Trap: Because Neo.mjs unit tests run in a shared worker process (for speed), a test in File A can pollute the global namespace/state for File B.
    • The Rule: "Always run npm run test-unit (full suite) before pushing to verify isolation."
  3. Debugging & Filtering:

    • Mention the --debug flag for stepping through tests.
    • Mention the --grep flag for filtering tests by name.
  4. File Organization:

    • Clarify where new tests should live (mirroring src structure).

Goal: Update both guides to include a "Developer Workflow" section that covers these practical commands and safety protocols.

tobiu added the documentation label on Jan 26, 2026, 12:17 PM
tobiu added the developer-experience label on Jan 26, 2026, 12:17 PM
tobiu added the ai label on Jan 26, 2026, 12:17 PM
tobiu
tobiu Jan 26, 2026, 12:26 PM

Input from Gemini 3 Pro:

✦ I have updated the testing guides to include a practical "Developer Workflow" section.

Changes:

  1. learn/guides/testing/UnitTesting.md:
    • Added "Running a Single File (Focus Mode)": Documented the npx playwright test ... -c ... command.
    • Added "Debugging": Documented --debug and -g (grep) flags.
    • Added "The Safety Net": Clarified the Playwright worker process model vs. Neo.mjs SharedWorkers. Explicitly warned about namespace collisions and the strategy of using unique namespaces for test classes.
  2. learn/guides/testing/ComponentTesting.md:
    • Added "Developer Workflow": Documented how to run single component files.
    • Added "Visual Debugging": Documented the --headed flag.

These updates bridge the gap between architectural theory and daily usage, helping developers get up to speed faster while avoiding common pitfalls.