@@ -27,6 +27,7 @@ The quick and easy way to create and use Vitest with [VS Code](https://code.visu
2727 - [ It] ( #it )
2828 - [ Test] ( #test )
2929 - [ Expect] ( #expect )
30+ - [ Any] ( #any )
3031 - [ Assertion] ( #assertion )
3132- [ Keyboard] ( #keyboard )
3233- [ Settings] ( #settings )
@@ -78,20 +79,21 @@ Below is a list of all available snippets and the triggers of each one. The `░
7879
7980### Import
8081
81- | Trigger | Result |
82- | -------: | ----------------------------------------------------------------- |
83- | ` iv→ ` | ` import { it, expect, describe } from 'vitest'█ ` |
82+ | Trigger | Result |
83+ | -------: | ---------------------------------------------------------------------------- |
84+ | ` iv→ ` | ` import { it, expect, describe } from 'vitest'█ ` |
85+ | ` ive→ ` | ` import { beforeEach, afterEach, it, expect, describe, vi } from 'vitest'█ ` |
8486
8587### Setup
8688
8789| Trigger | Result |
8890| -------: | --------------------------------------------------------------- |
89- | ` ae→ ` | <code >afterEach(() => {<br />  ;  ; █<br />})</code > |
90- | ` aa→ ` | <code >afterAll(() => {<br />  ;  ; █<br />})</code > |
91- | ` be→ ` | <code >beforeEach(() => {<br />  ;  ; █<br />})</code > |
92- | ` bea→ ` | <code >beforeEach(async () => {<br />  ;  ; █<br />})</code > |
9391| ` ba→ ` | <code >beforeAll(() => {<br />  ;  ; █<br />})</code > |
9492| ` baa→ ` | <code >beforeAll(async () => {<br />  ;  ; █<br />})</code > |
93+ | ` be→ ` | <code >beforeEach(() => {<br />  ;  ; █<br />})</code > |
94+ | ` bea→ ` | <code >beforeEach(async () => {<br />  ;  ; █<br />})</code > |
95+ | ` ae→ ` | <code >afterEach(() => {<br />  ;  ; █<br />})</code > |
96+ | ` aa→ ` | <code >afterAll(() => {<br />  ;  ; █<br />})</code > |
9597
9698### Describe
9799
@@ -104,18 +106,21 @@ Below is a list of all available snippets and the triggers of each one. The `░
104106
105107### Mock
106108
107- | Trigger | Result |
108- | -------: | ------------------------------------------------------------------------------ |
109- | ` vf→ ` | ` vi.fn()█ ` |
110- | ` vfrv→ ` | ` vi.fn().mockResolvedValue(█) ` |
111- | ` cf→ ` | ` const ░nameMock = vi.fn()█ ` |
112- | ` cfrv→ ` | ` const ░nameMock = vi.fn().mockResolvedValue(█) ` |
113- | ` mrv→ ` | ` ░mock.mockReturnValue(█) ` |
114- | ` mrvo→ ` | ` ░mock.mockReturnValueOnce(█) ` |
115- | ` vs→ ` | ` vi.spyOn(░global, '░method')█ ` |
116- | ` vsi→ ` | ` vi.spyOn(░global, '░method').mockImplementation(() => █) ` |
117- | ` cs→ ` | ` const ░methodSpy = vi.spyOn(░global, '░method')█ ` |
118- | ` csi→ ` | ` const ░methodSpy = vi.spyOn(░global, '░method').mockImplementation(() => █) ` |
109+ | Trigger | Result |
110+ | -------: | ------------------------------------------------------------------------------------------------------------- |
111+ | ` aevcr→ ` | <code >afterEach(() => {<br />  ;  ; vi.clearAllMocks()<br />  ;  ; vi.resetAllMocks()<br />})█</code > |
112+ | ` vm→ ` | ` vi.mock('░path')█ ` |
113+ | ` vmrv→ ` | ` vi.mock('░path').mockResolvedValue(█) ` |
114+ | ` vf→ ` | ` vi.fn()█ ` |
115+ | ` vfrv→ ` | ` vi.fn().mockResolvedValue(█) ` |
116+ | ` cf→ ` | ` const ░nameMock = vi.fn()█ ` |
117+ | ` cfrv→ ` | ` const ░nameMock = vi.fn().mockResolvedValue(█) ` |
118+ | ` mrv→ ` | ` ░mock.mockReturnValue(█) ` |
119+ | ` mrvo→ ` | ` ░mock.mockReturnValueOnce(█) ` |
120+ | ` vs→ ` | ` vi.spyOn(░global, '░method')█ ` |
121+ | ` vsi→ ` | ` vi.spyOn(░global, '░method').mockImplementation(() => █) ` |
122+ | ` cs→ ` | ` const ░methodSpy = vi.spyOn(░global, '░method')█ ` |
123+ | ` csi→ ` | ` const ░methodSpy = vi.spyOn(░global, '░method').mockImplementation(() => █) ` |
119124
120125### It
121126
@@ -146,7 +151,20 @@ Below is a list of all available snippets and the triggers of each one. The `░
146151| ` ea→ ` | ` expect.assertions(█) ` |
147152| ` eha→ ` | ` expect.hasAssertions()█ ` |
148153| ` erj→ ` | ` expect(░).rejects█ ` |
149- | ` ers→ ` | ` expect(░).resolves█ ` |
154+ | ` ers→ ` | ` expect(░).resolves█ ` |
155+
156+ ### Any
157+
158+ | Trigger | Result |
159+ | -------: | ------------------------ |
160+ | ` eav→ ` | ` expect.any(░)█ ` |
161+ | ` eas→ ` | ` expect.any(String)█ ` |
162+ | ` ean→ ` | ` expect.any(Number)█ ` |
163+ | ` eab→ ` | ` expect.any(Boolean)█ ` |
164+ | ` ead→ ` | ` expect.any(Date)█ ` |
165+ | ` eaf→ ` | ` expect.any(Function)█ ` |
166+ | ` eaa→ ` | ` expect.any(Array)█ ` |
167+ | ` eat→ ` | ` expect.anything()█ ` |
150168
151169### Assertion
152170
0 commit comments