diff --git a/examples/app-vitest-full/pages/other/[slug].vue b/examples/app-vitest-full/pages/other/[slug].vue new file mode 100644 index 000000000..04d85e1bd --- /dev/null +++ b/examples/app-vitest-full/pages/other/[slug].vue @@ -0,0 +1,3 @@ + diff --git a/examples/app-vitest-full/tests/nuxt/mount-component.spec.ts b/examples/app-vitest-full/tests/nuxt/mount-component.spec.ts new file mode 100644 index 000000000..a9d241a36 --- /dev/null +++ b/examples/app-vitest-full/tests/nuxt/mount-component.spec.ts @@ -0,0 +1,12 @@ +import { describe, expect, it } from 'vitest' +import { mount } from '@vue/test-utils' + +import SlugPage from '~/pages/other/[slug].vue' + +describe('mounting components', () => { + // https://github.com/nuxt/test-utils/issues/594 + it('mounts a dynamic route', async () => { + const component = mount(SlugPage) + expect(component.html()).toMatchInlineSnapshot(`"
"`) + }) +})