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
Problem
CONTRIBUTING.md step 5 instructs contributors to run:
This fails immediately for every test file, e.g.:
because the
.mjstest files import.tssources and require thetsxESM loader, which plainnodedoesn't provide. The correct invocation (perpackage.json) is:or simply
npm run test:plugins/npm test.Verified:
npm test→ 158/158 passing; directnode test-*.mjs→ SyntaxError on every file.Fix
Update CONTRIBUTING.md step 5 to reference
npm run test:plugins(or the fullnode --import tsx --test ...form), matchingpackage.jsonscripts.Acceptance criteria