Skip to content

[Framework] CONTRIBUTING.md test command fails as documented #95

Closed

Description

@striderZA

Problem

CONTRIBUTING.md step 5 instructs contributors to run:

node .opencode/plugins/tests/test-<name>.mjs

This fails immediately for every test file, e.g.:

SyntaxError: The requested module '../ccgs-hooks.ts' does not provide an export named 'handleLogAgent'

because the .mjs test files import .ts sources and require the tsx ESM loader, which plain node doesn't provide. The correct invocation (per package.json) is:

node --import tsx --test .opencode/plugins/tests/test-<name>.mjs

or simply npm run test:plugins / npm test.

Verified: npm test → 158/158 passing; direct node test-*.mjs → SyntaxError on every file.

Fix

Update CONTRIBUTING.md step 5 to reference npm run test:plugins (or the full node --import tsx --test ... form), matching package.json scripts.

Acceptance criteria

  • CONTRIBUTING.md's documented test command actually runs successfully when copy-pasted

Activity

  1. added
    documentationImprovements or additions to documentation
    testingTest suite, test coverage, test infrastructure
    framework-reviewIdentified during comprehensive framework review
    on Aug 2, 2026
  2. striderZA commented on Aug 2, 2026

    @striderZA
    OwnerAuthor

    Fixed in commit edaac99 (local, not yet pushed). Verified via node tests/agents/validate.mjs (206/206 PASS) and npm test (158/158 PASS).

  3. striderZA commented on Aug 2, 2026

    @striderZA
    OwnerAuthor

    Correction: the initial close (edaac99) missed two more instances of the broken node .opencode/plugins/tests/test-<name>.mjs command — README.md:351 and AGENTS.md:248. Fixed in follow-up commit 09c6eae; both now reference npm run test:plugins. Re-verified: npm test 158/158.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationframework-reviewIdentified during comprehensive framework reviewpriority-highFix soontestingTest suite, test coverage, test infrastructure

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions