Repository navigation
test: remove two duplicate smoke tests - #890
Merged
Merged
Conversation
`integrate-vitest/__tests__/index.spec.ts > transform` repeats integrate-module's `should resolve native addon` (same API, same CommonJS output). `named import from json` in integrate-module asserts on a JSON import that Node loads natively, so it cannot fail when oxc-node's JSON loader breaks; json-modules.spec.ts covers named JSON imports. Also note why the two stdin TTY tests are kept, and repoint a comment that referred to the deleted spec. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01PxVsmvB9xfZKfVnUonY8kf
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Brooklyn · project thread
Before: two smoke tests could not fail for a reason no other test catches.
integrate-vitest'sindex.spec.ts > transformrepeats integrate-module'sshould resolve native addon, and integrate-module'snamed import from jsonasserts on a JSON import that Node loads natively, so it passes even when oxc-node's JSON loader is broken.After: both are gone. The two stdin TTY tests that alone catch a TTY regression now say so in a comment, and a comment that pointed at the deleted spec points at the surviving test. Only test files change.
How: each removal was defended by mutating
src/lib.rswith the most realistic regression it could catch, rebuilding the addon, running all three JS suites, and reverting.Totals
#[test]s are untouched.transform9.72 ms,named import from json0.09 ms).Removals
packages/integrate-vitest/__tests__/index.spec.ts > transform(whole file)new OxcTransformer(process.cwd()).transformAsync("foo.ts", …)and checks the CommonJS output;packages/integrate-module/src/index.ts > should resolve native addondoes the same with"index.ts".src/lib.rsTransformTask::computeemitsModule::Esminstead ofModule::CommonJS. Fails both this test andshould resolve native addon.should resolve native addon.packages/integrate-module/src/index.ts > named import from jsonimport pkgJson from "../package.json" with { type: "json" }is loaded by Node itself, not by oxc-node's JSON loader, and the test only readspkgJson.version, a default-export property.src/lib.rsJSON loader emitsexport default {}. 9json-modules/ percent-encoded Vitest cases fail; all of integrate-module, including this test, passes.json-modules.spec.ts > a named importand> a paths alias keeps the synthesised named exportsfail; this test passes.json-modules.spec.tscases;resolve package.jsonkeeps the import itself exercised.Kept after defense
stdin-tty.spec.ts > CLI preserves TTY properties when stdin is a TTYand> CLI with node directly preserves TTY (baseline comparison). Mutation M6,process.stdin.isTTY = false;at the top ofpackages/core/register.mjs, fails only these two across all three suites (re-run on this branch). Each now carries a comment saying so.Case counts
0 failures before and after.
What ran and what did not
6d5376dand on this branch; mutations M3, M4, M5 (with an addon rebuild each) and M6, each reverted afterwards;vp check --no-fmt(lint and type-check, clean on 99 files);vp fmt --checkon the touched files (clean).vp checkreports a formatting issue inlerna.json; it reports the same at6d5376d, and this PR does not touch that file.Ages:
transformdates from before #663 (2026-07-04);named import from jsonfrom #20 (2024-07-18). Neither is in a permission or security suite.To revert:
git revert 80ceedd.Generated by Claude Code