Skip to content

fix: make test scripts work on Windows - #1710

Open
mikemikimike wants to merge 1 commit into
openai:mainfrom
mikemikimike:fix/windows-test-scripts
Open

fix: make test scripts work on Windows#1710
mikemikimike wants to merge 1 commit into
openai:mainfrom
mikemikimike:fix/windows-test-scripts

Conversation

@mikemikimike

Copy link
Copy Markdown

This pull request resolves #1708.nn## SummarynnThe documented test scripts used POSIX-style inline environment assignments that fail under Windows cmd.exe. This change adds cross-env, wraps the eleven affected scripts, preserves existing environment variables and Vitest argument forwarding, and updates pnpm-lock.yaml.nn## Verificationnn- Verified cross-env environment setup and argument forwarding.n- pnpm install --frozen-lockfile passed.n- Full pnpm test was attempted on Windows; Unix-specific tests requiring /bin/sh failed with spawn /bin/sh ENOENT, which is an environment limitation unrelated to this change.`n- git diff --check passed.

@changeset-bot

changeset-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e05b6dc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mikemikimike

Copy link
Copy Markdown
Author

Thanks for offering to test this on the Windows setup that reproduces #1708. The branch is now pushed. Could you please run the affected scripts, especially pnpm test and pnpm test:watch with a Vitest passthrough argument, and report whether they start successfully under your setup? The full suite on my Windows environment reaches Vitest but Unix-specific tests fail because /bin/sh is unavailable.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e05b6dcd92

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread package.json
"test:coverage": "cross-env NODE_ENV=test OPENAI_AGENTS_TEST_PROFILE=full vitest run --coverage",
"test:examples": "pnpm -r build-check",
"test:integration": "NODE_ENV=test vitest run --config=vitest.integration.config.ts",
"test:integration": "cross-env NODE_ENV=test vitest run --config=vitest.integration.config.ts",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Update the test:integration contract expectation

Whenever pnpm test or pnpm test:workflow-scripts runs, scripts/workflow-contracts.test.mjs still requires test:integration to equal the previous unwrapped command (NODE_ENV=test vitest run ...). This changed value therefore makes the repository test suite fail on every platform; update that contract assertion alongside the script.

Useful? React with 👍 / 👎.

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.

pnpm test fails on Windows: eleven scripts use POSIX inline env assignment and cmd.exe rejects it

1 participant