Skip to content
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

Docs: Migrate mockedStore typings to vitest v2 #2759

Closed
wants to merge 1 commit into from

Conversation

lud-hu
Copy link

@lud-hu lud-hu commented Sep 2, 2024

Copy link

netlify bot commented Sep 2, 2024

Deploy Preview for pinia-playground canceled.

Name Link
🔨 Latest commit ed1e62d
🔍 Latest deploy log https://app.netlify.com/sites/pinia-playground/deploys/66d56fa8a2dc20000726af13

Copy link

netlify bot commented Sep 2, 2024

Deploy Preview for pinia-official ready!

Name Link
🔨 Latest commit ed1e62d
🔍 Latest deploy log https://app.netlify.com/sites/pinia-official/deploys/66d56fa8ae2553000837de1e
😎 Deploy Preview https://deploy-preview-2759--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.

@lud-hu lud-hu changed the title Migrate mockedStore typings to vitest v2 Docs: Migrate mockedStore typings to vitest v2 Sep 2, 2024
Copy link
Member

@posva posva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@@ -191,7 +191,7 @@ function mockedStore<TStoreDef extends () => unknown>(
...args: infer Args
) => infer ReturnT
? // 👇 depends on your testing framework
Mock<Args, ReturnT>
Mock<(args: Args) => ReturnT>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although now it should be able to just take Actions[K]. I need to test it

@@ -191,7 +191,7 @@ function mockedStore<TStoreDef extends () => unknown>(
...args: infer Args
) => infer ReturnT
? // 👇 depends on your testing framework
Mock<Args, ReturnT>
Mock<(args: Args) => ReturnT>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be

Suggested change
Mock<(args: Args) => ReturnT>
Mock<(...args: Args) => ReturnT>

@posva posva closed this in 67ddc04 Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants