Skip to content

feat(test): support unstubbing actions #2960

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: v3
Choose a base branch
from

Conversation

CyberAP
Copy link

@CyberAP CyberAP commented Apr 1, 2025

This change makes it possible to unstub actions when using stubActions: true in createTestingPinia. To do that you have to call mockRestore on the action.

createTestingPinia()

useMyStore().someAction.mockRestore()

// this calls an actual implementation
useMyStore().someAction()

The support for unstubbing is provided only for jest and vitest.

Copy link

netlify bot commented Apr 1, 2025

Deploy Preview for pinia-official ready!

Name Link
🔨 Latest commit e4a37d0
🔍 Latest deploy log https://app.netlify.com/sites/pinia-official/deploys/67eba452886531000841b72b
😎 Deploy Preview https://deploy-preview-2960--pinia-official.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-project-automation github-project-automation bot moved this to 🆕 Triaging in Pinia Roadmap Jun 3, 2025
@posva posva moved this from 🆕 Triaging to 💬 In discussion in Pinia Roadmap Jun 3, 2025
@posva posva moved this from 💬 In discussion to 🧑‍💻 In progress in Pinia Roadmap Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🧑‍💻 In progress
Development

Successfully merging this pull request may close these issues.

1 participant