DenoDDeno
Powered by
Jess182J
Denoβ€’10mo 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()
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
Testing in isolation with mocks
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
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Mocking EventSource
mytyMmyty / help
9mo ago
Mocking the FileSystem
bennypBbennyp / help
11mo ago
Basic Mocking example for `override global or imported objects` does not work
beelerBbeeler / help
11mo ago
ES Module mocking workaround
SMellSSMell / help
3y ago