Skip to content

feat(utils): add mocked type helpers#739

Merged
eratio08 merged 1 commit into
eratio08:mainfrom
CHC383:feat/mock_type_utils
Apr 4, 2025
Merged

feat(utils): add mocked type helpers#739
eratio08 merged 1 commit into
eratio08:mainfrom
CHC383:feat/mock_type_utils

Conversation

@CHC383

@CHC383 CHC383 commented Apr 3, 2025

Copy link
Copy Markdown

close #662

In this initial version, I combined the API for mock and deepMock into mocked similar to Vitest. However, I left the API for mockFn aside, as adding another boolean parameter func? which is exclusive of deep? is weird.

I am open to split them into three APIs or combine all of them, please let me know.

similar to Vitest's vi.mocked
@CHC383 CHC383 requested a review from eratio08 as a code owner April 3, 2025 19:54

@eratio08 eratio08 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Nice, thanks!

@eratio08 eratio08 enabled auto-merge (squash) April 4, 2025 19:14
@eratio08 eratio08 disabled auto-merge April 4, 2025 19:14
@eratio08 eratio08 merged commit eb1e7f2 into eratio08:main Apr 4, 2025
@github-actions

github-actions Bot commented Apr 4, 2025

Copy link
Copy Markdown

🎉 This PR is included in version 3.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide a type helper like vi.mocked

2 participants