Skip to content

Commit

Permalink
docs: clarify
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va authored Sep 23, 2024
1 parent 2a50464 commit 8723242
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/api/vi.md
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ console.log(cart.getApples()) // still 42!
:::

::: tip
It is not possible to spy on a specific exported method in [Browser Mode](/guide/browser/). Instead, you can spy on every exported method by calling `vi.mock("./file-path.js", { spy: true })`. This will mock every export but keep its implementation intact, allowing you to assert if the method was called correctly.
It is not possible to spy on exported methonds in [Browser Mode](/guide/browser/). Instead, you can spy on every exported method by calling `vi.mock("./file-path.js", { spy: true })`. This will mock every export but keep its implementation intact, allowing you to assert if the method was called correctly.

```ts
import { calculator } from './src/calculator.ts'
Expand Down

0 comments on commit 8723242

Please sign in to comment.