Select the types of activity you want to include in your feed.
[READ-ONLY] Mirror of https://github.com/danielroe/nuxt-vitest. An vitest environment with support for testing code that needs a Nuxt runtime environment
···109109110110### `mountSuspended`
111111112112-// TODO:
112112+`mountSuspended` allows you to mount any vue component within the Nuxt environment, allowing async setup and access to injections from your Nuxt plugins. For example:
113113+114114+```ts
115115+// tests/components/SomeComponents.nuxt.spec.ts
116116+it('can mount some component', async () => {
117117+ const component = await mountSuspended(SomeComponent)
118118+ expect(component.text()).toMatchInlineSnapshot(
119119+ 'This is an auto-imported component'
120120+ )
121121+})
122122+123123+// tests/App.nuxt.spec.ts
124124+it('can also mount an app', async () => {
125125+ const component = await mountSuspended(App, { route: '/test' })
126126+ expect(component.html()).toMatchInlineSnapshot(`
127127+ "<div>This is an auto-imported component</div>
128128+ <div> I am a global component </div>
129129+ <div>/</div>
130130+ <a href=\\"/test\\"> Test link </a>"
131131+ `)
132132+})
133133+```
113134114135### `mockNuxtImport`
115136