Skip to content

Commit 4a830e7

Browse files
tweak
1 parent 6df23f4 commit 4a830e7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/api/vi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ test('importing the next module imports mocked one', async () => {
230230
```
231231

232232
::: tip
233-
In environments that support [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management), you can use `using` instead of `const` to automatically call [`vi.doUnmock()`](#vi-dounmock) on the mocked module when the containing block is exited. This is especially useful when mocking a dynamically imported module for a single test case.
233+
In environments that support [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management), you can use `using` on the value returned from `vi.doMock()` to automatically call [`vi.doUnmock()`](#vi-dounmock) on the mocked module when the containing block is exited. This is especially useful when mocking a dynamically imported module for a single test case.
234234

235235
```ts
236236
it('uses a mocked version of my-module', () => {

0 commit comments

Comments
 (0)