We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7b0784 commit fb0dea2Copy full SHA for fb0dea2
2 files changed
examples/app-vitest-full/tests/nuxt/routing.spec.ts
@@ -6,7 +6,7 @@ import App from '~/app.vue'
6
7
describe('routing', () => {
8
it('defaults to index page', async () => {
9
- expect(useRoute().matched[0].meta).toMatchInlineSnapshot(`
+ expect(useRoute().matched[0]!.meta).toMatchInlineSnapshot(`
10
{
11
"value": "set in index",
12
}
examples/app-vitest-full/tests/nuxt/server.spec.ts
@@ -14,7 +14,8 @@ describe('server mocks and data fetching', () => {
14
eventHandler(() => ({ id: 1 })),
15
)
16
const server = await listen(toNodeListener(app))
17
- const [{ url }] = await server.getURLs()
+ const urls = await server.getURLs()
18
+ const { url } = urls[0]!
19
expect(await $fetch<unknown>('/todos/1', { baseURL: url })).toMatchObject({
20
id: 1,
21
})
0 commit comments