Add tests for commandOutputParsing, wranglerAction, and github service#420
Open
vliggio wants to merge 2 commits intocloudflare:mainfrom
Open
Add tests for commandOutputParsing, wranglerAction, and github service#420vliggio wants to merge 2 commits intocloudflare:mainfrom
vliggio wants to merge 2 commits intocloudflare:mainfrom
Conversation
Covers the three biggest test gaps: commandOutputParsing (12 new tests, previously 0% coverage), wranglerAction (16 new tests for authenticationSetup, execCommands, wranglerCommands, and uploadSecrets edge cases), and github service (4 new tests for createGitHubDeploymentAndJobSummary skip conditions). Authored along with the magical Claude.ai
The authenticationSetup, execCommands, wranglerCommands, and extra uploadSecrets tests were moved to PR cloudflare#415 where they are more relevant. Authored along with the magical Claude.ai
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
commandOutputParsing.ts(previously 0% coverage): artifact-based output parsing for pages deploy, worker deploy, and version upload; deprecated stdout fallback paths; edge cases like empty targets and unrecognized commandswranglerAction.ts:authenticationSetup,execCommands(empty/wrangler-prefixed/plain/sequential),wranglerCommands(default deploy/publish,--envflag injection/dedup,--varflags, stdout/stderr capture, output dir env var),uploadSecretsedge cases (empty secrets, missing env var)service/github.ts:createGitHubDeploymentAndJobSummaryskip conditions when token, production_branch, pages_project, or deployment_trigger are missingNo changeset needed — test-only changes with no behavior modifications.
Test plan
npx vitest run)