Skip to content

Comments

fix(spy) Fix: vi.spyOn() Compatibility with Google APIs (#3141)#3670

Merged
sheremet-va merged 2 commits intovitest-dev:mainfrom
Maxim-Mazurok:main
Nov 24, 2023
Merged

fix(spy) Fix: vi.spyOn() Compatibility with Google APIs (#3141)#3670
sheremet-va merged 2 commits intovitest-dev:mainfrom
Maxim-Mazurok:main

Conversation

@Maxim-Mazurok
Copy link
Contributor

@Maxim-Mazurok Maxim-Mazurok commented Jun 26, 2023

Types change for @vitest/spy to address this issue: #3141

Applying the same patch I use in my project for a while now, seems to work for me.

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@Maxim-Mazurok Maxim-Mazurok changed the title fix #3141 fix(spy) Address #3141 Jun 26, 2023
@Maxim-Mazurok Maxim-Mazurok changed the title fix(spy) Address #3141 fix(spy) Fix: vi.spyOn() Compatibility with Google APIs (#3141) Jun 26, 2023
@sheremet-va
Copy link
Member

Can you add tests covering your usecase?

@Maxim-Mazurok
Copy link
Contributor Author

I could try, but are there any d.ts types tests for this package? I couldn't find any

@sheremet-va
Copy link
Member

There is test/typescript

@netlify
Copy link

netlify bot commented Jul 23, 2023

Deploy Preview for fastidious-cascaron-4ded94 canceled.

Name Link
🔨 Latest commit f180b13
🔍 Latest deploy log https://app.netlify.com/sites/fastidious-cascaron-4ded94/deploys/655fe595ce34270008447514

@Maxim-Mazurok
Copy link
Contributor Author

Maxim-Mazurok commented Jul 23, 2023

Can you add tests covering your usecase?

I've added a test, this is pretty much how I use it in my project, and you can see the error before my changes on the screenshot below.

image

I understand that adding 3rd party lib just for the test isn't ideal, but I expect it to be quite challenging to reproduce, hopefully, this is good enough, thanks!

@Maxim-Mazurok
Copy link
Contributor Author

@sheremet-va how does it look? Should I resolve conflicts or abandon PR?

@sheremet-va
Copy link
Member

@sheremet-va how does it look? Should I resolve conflicts or abandon PR?

Sorry for the long wait. If you can resolve conflicts, we can merge this as is.

@Maxim-Mazurok Maxim-Mazurok force-pushed the main branch 3 times, most recently from d5edd31 to 3f60594 Compare November 23, 2023 23:11
@sheremet-va sheremet-va merged commit edb0d28 into vitest-dev:main Nov 24, 2023
LorenzoBloedow pushed a commit to LorenzoBloedow/vitest that referenced this pull request Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants