Skip to content

[Tests] Remove filesystem mocks in execute-operation.test.ts#7532

Open
gonzaloriestra wants to merge 1 commit into
mainfrom
remove-fs-mock-execute-operation-test-7362924430070990755
Open

[Tests] Remove filesystem mocks in execute-operation.test.ts#7532
gonzaloriestra wants to merge 1 commit into
mainfrom
remove-fs-mock-execute-operation-test-7362924430070990755

Conversation

@gonzaloriestra
Copy link
Copy Markdown
Contributor

@gonzaloriestra gonzaloriestra commented May 12, 2026

Refactor packages/app/src/cli/services/execute-operation.test.ts to remove global filesystem mocking. By eliminating vi.mock('@shopify/cli-kit/node/fs'), the tests now interact with the real filesystem within an isolated inTemporaryDirectory. Brittle implementation-coupled assertions on writeFile call counts are replaced with behavioral assertions that verify the resultant file state using readFile.


PR created automatically by Jules for task 7362924430070990755 started by @gonzaloriestra

@google-labs-jules
Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions github-actions Bot added the no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. label May 12, 2026
@gonzaloriestra gonzaloriestra temporarily deployed to breaking-change-approval May 12, 2026 00:35 — with GitHub Actions Inactive
@gonzaloriestra gonzaloriestra marked this pull request as ready for review May 12, 2026 09:44
@gonzaloriestra gonzaloriestra requested a review from a team as a code owner May 12, 2026 09:44
@gonzaloriestra gonzaloriestra added the Jules Created by Jules label May 12, 2026
Refactor packages/app/src/cli/services/execute-operation.test.ts to
remove global filesystem mocking. By eliminating
vi.mock('@shopify/cli-kit/node/fs'), the tests now interact with the
real filesystem within an isolated inTemporaryDirectory. Brittle
implementation-coupled assertions on writeFile call counts are
replaced with behavioral assertions that verify the resultant file
state using readFile.

Duplicate check:
Ran 'git log --grep="\[Tests\]" --oneline' and verified no previous
PR refactored this specific file to remove filesystem mocks.
@gonzaloriestra gonzaloriestra force-pushed the remove-fs-mock-execute-operation-test-7362924430070990755 branch from e6fd34a to 5846d4b Compare May 12, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Jules Created by Jules no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant