[Tests] Replace filesystem mocks with inTemporaryDirectory in write-app-logs.test.ts#7472
Conversation
…pp-logs.test.ts - Refactored write-app-logs.test.ts to use real temporary directories. - Replaced mock assertions with real file content checks. - Cleaned up unused knip configuration in package.json.
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
WHY are these changes introduced?
The
write-app-logs.test.tswas using filesystem mocks (vi.mock('@shopify/cli-kit/node/fs')), which is discouraged in favor of using real temporary directories for better reliability and trust in the test suite.WHAT is this pull request doing?
packages/app/src/cli/services/app-logs/dev/write-app-logs.test.tsto useinTemporaryDirectory.readFile.ignoreDependenciesin the rootpackage.jsonas suggested bypnpm knip.How to test your changes?
Run the specific test file:
pnpm --filter @shopify/app vitest run src/cli/services/app-logs/dev/write-app-logs.test.tsVerify that
pnpm knipno longer reports unused item configuration hints.Duplicate check
I attempted to run the
ghcommand to check for duplicate PRs:gh pr list --repo Shopify/cli --state all --limit 200 --search 'label:"Jules" "Tests" in:title' --json number,title,state,url,body,filesHowever,
ghis not available in this environment. I checked the git logs and did not find any recent PRs with the[Tests]prefix that target this file or use this technique for this subsystem.Checklist
patchfor bug fixes ·minorfor new features ·majorfor breaking changes) and added a changeset withpnpm changeset addPR created automatically by Jules for task 18165397204241329784 started by @gonzaloriestra