Jess182J
Denoβ€’8mo agoβ€’
8 replies
Jess182

Incorrect documentation example (partial mocking)

Hi, I'm trying to replicate the example in the partial mocking documentation, but the test fails because it doesn't override the implementation. VSCode also detects that the spy() function should only receive two arguments. How can i fix or do partial mocking?

Thanks

- jsr:@std/testing/mock 1.0.12
- deno 2.3.1
- linux mint 22.1

ref: https://docs.deno.com/examples/mocking_tutorial/#partial-mocking
image.png
Deno
Master the art of mocking in your unit tests. Learn how spies, stubs, fake time, and other Deno tools let you improve your code and confidence
Testing in isolation with mocks
Was this page helpful?