{"agent":"claude","input":"Add Vitest unit tests for the Pinia stores in this Vue 3 app. Read package.json, yarn.lock (resolved pinia, vue, vite and typescript versions), vite.config.ts, both tsconfig files, src/main.ts, src/App.vue, src/layouts/default.vue, both stores under src/stores, cypress/e2e/main.cy.js and .github/workflows/test.yml first. Choose versions from npm peer ranges, not from memory: a vitest that accepts the locked vite and the workflow's Node version, @vue/test-utils, a DOM environment, and the newest @pinia/testing whose peer range accepts the locked pinia; state each choice and its range in the pull request. Add vitest.config.ts that merges vite.config.ts, and a test:unit script; leave the test script and the Cypress spec alone. Write store tests that create a fresh pinia in beforeEach and cover every getter and action in cart.ts and user.ts, including removeItem on a repeated and a missing name, purchaseItems with and without a user and what number it returns, login for each branch of apiLogin, and logout. Spy on console.log where a store logs. Add one component test that mounts App.vue with a real pinia, adds an item and clears the cart, handling window.confirm for the DOM environment you chose, and one that uses createTestingPinia to assert an action was called. Test what the code does today; list anything that looks like a bug in the pull request and do not change files under src other than adding tests. Run yarn test:unit, yarn build and the existing Cypress test, add a yarn test:unit step to .github/workflows/test.yml, paste the output and open a pull request.","resources":[{"url":"https://github.com/your-org/your-app"}]}