Skip to content

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

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

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