Skip to content

[Tests] Replace filesystem mocks with real temp directories in store result tests#7982

Closed
gonzaloriestra wants to merge 1 commit into
mainfrom
tests-remove-fs-mocks-store-result-8876345509233618617
Closed

[Tests] Replace filesystem mocks with real temp directories in store result tests#7982
gonzaloriestra wants to merge 1 commit into
mainfrom
tests-remove-fs-mocks-store-result-8876345509233618617

Conversation

@gonzaloriestra

Copy link
Copy Markdown
Contributor

This PR improves the test suite for the @shopify/store package by removing filesystem mocks in result.test.ts.

Why this change is needed?

The automated task protocol for tests (.agents/automated-tasks/tests.md) mandates using real files and directories in temporary directories instead of mocking the filesystem. This makes tests more robust and less coupled to implementation details of how the filesystem is accessed.

How to test your changes?

CI

Checklist

  • I have followed the Testing Guidelines.
  • I have provided a clear description of the changes.
  • I have updated the documentation (if applicable).
  • I have added tests to cover my changes.
  • I have run pnpm lint, pnpm knip, pnpm type-check, and pnpm test:unit and they all pass.

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

…result tests

Refactor `packages/store/src/cli/services/store/execute/result.test.ts` to use `inTemporaryDirectory` and `readFile` instead of mocking `@shopify/cli-kit/node/fs`. This ensures that file operations are verified against the actual filesystem and avoids brittle mocks.

- Removed `vi.mock('@shopify/cli-kit/node/fs')`
- Updated tests to use `inTemporaryDirectory` for file output verification
- Verified that `renderSuccess` is called with the correct dynamic path
@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 Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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