Add CLI smoke test against fixture scaffold#63
Open
advancedresearcharray wants to merge 10 commits into
Open
Conversation
f3e0d76 to
bbbdd35
Compare
Contributor
Author
|
Ready for review — CI is green on Node 20/22 and the suite covers all non-interactive top-level commands against the fixture scaffold (issue #57 acceptance criteria). Latest push:
|
ff919f9 to
a4271ba
Compare
Contributor
Author
|
@theDakshJaitly — ready for review when you have a moment. Latest push adds explicit coverage for default CI was green on the prior push (Node 20/22); this is a one-test addition only. |
961a47b to
0861f74
Compare
Run top-level CLI commands in a git-backed smoke project and assert exit codes and key output, including --version matching package.json.
Add pattern add to the CLI smoke suite, clean up unused imports, and remove the temp project directory after tests finish.
Surface CLI stdout/stderr in assertion messages on non-zero exits and guard fixture teardown when setup fails before projectRoot is assigned.
Cover the non-quiet check path explicitly so regressions in the standard drift report are caught alongside --quiet.
Ensure dist/cli.js exists before each smoke invocation so parallel vitest files (e.g. cli.test.ts beforeAll build) cannot delete the binary mid-suite and cause flaky MODULE_NOT_FOUND failures.
a01da7b to
781e9a6
Compare
Assert check --json returns a clean drift report on the fixture scaffold (context/ and patterns/ frontmatter included) and cover zsh/fish completion scripts alongside bash.
781e9a6 to
5c312a4
Compare
Assert dist/cli.js exists after npm run build in beforeAll and ensureCliBuilt so smoke tests fail fast with a clear error instead of opaque spawn failures. Removes accidental corrupted internal/exporter/mkdocs.go from a prior commit.
Contributor
Author
|
Addressed peer-review feedback:
Local test run: |
Run npm run build and assert the CLI artifact exists in a global setup hook so smoke and integration tests fail fast when the build step is skipped or broken, addressing peer-review feedback on build verification.
2f8b2d6 to
068b315
Compare
Run --version after build so smoke tests fail fast with a clear error when runtime dependencies are missing, not only when dist/cli.js is absent.
068b315 to
03eb883
Compare
Set MEX_TELEMETRY=0 when spawning the CLI in smoke tests so temp-dir runs never emit telemetry even if vitest env inheritance changes. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
test/fixtures/smoke-project/minimal.mexscaffoldtest/cli-smoke.test.tsrunning top-level commands (--version,commands,check,doctor,log,timeline,heartbeat,sync,setup,init,watch) with exit-code and output assertions--versionis asserted againstpackage.jsonso a hard-coded version drift would fail CICloses #57
Test plan
npm test -- test/cli-smoke.test.tsnpm run typecheck