Skip to content

fix(test): make Node tests portable on Windows#107

Closed
daehyeonxyz wants to merge 1 commit into
code-yeongyu:mainfrom
daehyeonxyz:codex/windows-test-portability-20260703
Closed

fix(test): make Node tests portable on Windows#107
daehyeonxyz wants to merge 1 commit into
code-yeongyu:mainfrom
daehyeonxyz:codex/windows-test-portability-20260703

Conversation

@daehyeonxyz

@daehyeonxyz daehyeonxyz commented Jul 3, 2026

Copy link
Copy Markdown

Summary

  • replace node --test test/*.test.mjs package scripts with a small Node runner that enumerates top-level .test.mjs files without relying on shell glob expansion
  • resolve the root package test path with fileURLToPath() so Windows drive paths are handled correctly
  • keep the aggregate plugin build-script test layout-aware when the LazyCodex mirror does not include the packages/omo-codex wrapper package

Verification

  • npm test from the repository root: 9 pass, 0 fail
  • node --test test\aggregate-build.test.mjs from plugins/omo: 1 pass, 0 fail, 1 skipped
  • git diff --check

Note

npm test from plugins/omo now reaches the full plugin suite on Windows instead of failing before discovery. That broader suite is still red on this checkout with unrelated fixture/artifact failures: 219 pass, 33 fail, 2 skipped. The visible failures include current aggregate MCP path expectations, auto-update marketplace-flow expectations, and missing @oh-my-opencode/shared-skills imports.


Summary by cubic

Make Node tests portable on Windows by replacing shell globbing with a Node-based runner and fixing Windows path handling in tests. This lets npm test run on Windows and keeps aggregate plugin tests robust in mirror layouts.

  • Bug Fixes
    • Added scripts/run-node-test-files.mjs to enumerate .test.mjs files and invoke node --test without shell globs.
    • Updated test scripts in root and plugins/omo to use the new runner.
    • Resolved Windows drive paths via fileURLToPath in the lazycodex-ai bin test.
    • Made the aggregate plugin build-script test layout-aware: skip when packages/omo-codex is absent, add a pathExists helper, and assert the new test script value.

Written for commit 1d30207. Summary will update on new commits.

Review in cubic

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Thanks for the PR! Changes to LazyCodex land through oh-my-openagent — could you open this against omo-codex over there instead? PRs in this repository can't be merged.

If you're working with a coding agent, prompt it like this:

I opened #107 ("fix(test): make Node tests portable on Windows") against code-yeongyu/lazycodex, but changes there land through code-yeongyu/oh-my-openagent, where the Codex implementation lives under packages/omo-codex. Read my original PR, then open an equivalent PR against code-yeongyu/oh-my-openagent. In the new PR body, link the original PR (#107), explain that it was first opened against lazycodex, and describe in detail what that PR changed and why.

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.

1 participant