Skip to content

fix: repair broken plugin test invocation in docs and package.json (#95) - #102

Merged
striderZA merged 1 commit into
masterfrom
fix/issue-95-contributing-test-command
Aug 2, 2026
Merged

fix: repair broken plugin test invocation in docs and package.json (#95)#102
striderZA merged 1 commit into
masterfrom
fix/issue-95-contributing-test-command

Conversation

@striderZA

Copy link
Copy Markdown
Owner

Closes #95.

CONTRIBUTING.md, README.md, and AGENTS.md all instructed contributors to run node .opencode/plugins/tests/test-<name>.mjs directly — fails immediately with a SyntaxError, since the .mjs test files import .ts sources and need the tsx ESM loader.

Found a second, deeper bug while fixing this: the existing npm run test:plugins script (the documented correct alternative) was itself broken — it passed a bare directory to node --test, which throws ERR_MODULE_NOT_FOUND trying to resolve a nonexistent .opencode/plugins/tests/index.ts under the tsx loader. Fixed the script in package.json to use the same working glob (test-*.mjs) as the test script.

Docs now consistently point to npm run test:plugins, and a stale nearby test count (129+ -> 158) was corrected alongside.

Verification

npm run test:plugins previously threw ERR_MODULE_NOT_FOUND on invocation; now runs to completion: 158/158 PASS.

CONTRIBUTING.md, README.md, and AGENTS.md all instructed contributors
to run `node .opencode/plugins/tests/test-<name>.mjs` directly, which
fails: the .mjs test files import .ts sources and require the tsx ESM
loader (`node --import tsx --test ...`).

Additionally, the existing `npm run test:plugins` script (the intended
correct alternative) was itself broken -- it passed a bare directory
to `node --test`, which fails under the tsx loader with
ERR_MODULE_NOT_FOUND trying to resolve a nonexistent index.ts. Fixed
it to use the same working glob as the `test` script.

Docs now consistently point to `npm run test:plugins` / `npm test`,
and stale test counts (129+ -> 158) were corrected alongside.

Verified: `npm run test:plugins` now runs successfully -> 158/158 PASS
(previously threw ERR_MODULE_NOT_FOUND immediately).
@striderZA
striderZA merged commit 6a40da6 into master Aug 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Framework] CONTRIBUTING.md test command fails as documented

1 participant