-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(test): add content components tests files
- Loading branch information
Showing
11 changed files
with
121 additions
and
0 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
packages/nuxt/test/components/content/ContentFloatingToc/ContentFloatingTocLinks.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { describe, it, expect } from 'vitest' | ||
import { renderSuspended } from '@nuxt/test-utils/runtime' | ||
import ContentFloatingTocLinks from '../../src/runtime/components/content/ContentFloatingToc/ContentFloatingTocLinks.vue' | ||
|
||
describe('ContentFloatingTocLinks', () => { | ||
it('can mount component', async () => { | ||
const html = await renderSuspended(ContentFloatingTocLinks) | ||
expect(html.html()).toMatchSnapshot() | ||
}) | ||
}) |
10 changes: 10 additions & 0 deletions
10
packages/nuxt/test/components/content/ContentFloatingToc/Index.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { describe, it, expect } from 'vitest' | ||
import { renderSuspended } from '@nuxt/test-utils/runtime' | ||
import Index from '../../src/runtime/components/content/ContentFloatingToc/Index.vue' | ||
|
||
describe('Index', () => { | ||
it('can mount component', async () => { | ||
const html = await renderSuspended(Index) | ||
expect(html.html()).toMatchSnapshot() | ||
}) | ||
}) |
11 changes: 11 additions & 0 deletions
11
.../components/content/ContentFloatingToc/__snapshots__/ContentFloatingTocLinks.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`ContentFloatingTocLinks > can mount component 1`] = ` | ||
"<div id="test-wrapper"> | ||
<div> | ||
<transition-stub enteractiveclass="transition-all duration-100 ease-in-out" enterfromclass="opacity-0" entertoclass="opacity-100" leaveactiveclass="transition-all duration-100 ease-in-out" leavefromclass="opacity-100" leavetoclass="opacity-0" mode="out-in" appear="false" persisted="false" css="true"> | ||
<!--v-if--> | ||
</transition-stub> | ||
</div> | ||
</div>" | ||
`; |
19 changes: 19 additions & 0 deletions
19
packages/nuxt/test/components/content/ContentFloatingToc/__snapshots__/Index.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`Index > can mount component 1`] = ` | ||
"<div id="test-wrapper"> | ||
<div class="fixed z-50 scale-[0.9] sm:scale-[0.6] transition-all duration-300 ease-in-out right-2 sm:right-6 top-1/2 -translate-y-1/2 origin-right hover:scale-110"> | ||
<div class="rounded-md mx-auto transition-all duration-300 ease-in-out p-0 border-transparent"> | ||
<nav class="overflow-y-auto cursor-pointer"> | ||
<div> | ||
<div> | ||
<transition-stub enteractiveclass="transition-all duration-100 ease-in-out" enterfromclass="opacity-0" entertoclass="opacity-100" leaveactiveclass="transition-all duration-100 ease-in-out" leavefromclass="opacity-100" leavetoclass="opacity-0" mode="out-in" appear="false" persisted="false" css="true"> | ||
<!--v-if--> | ||
</transition-stub> | ||
</div> | ||
</div> | ||
</nav> | ||
</div> | ||
</div> | ||
</div>" | ||
`; |
10 changes: 10 additions & 0 deletions
10
packages/nuxt/test/components/content/ContentNavigationTree.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { describe, it, expect } from 'vitest' | ||
import { renderSuspended } from '@nuxt/test-utils/runtime' | ||
import ContentNavigationTree from '../../src/runtime/components/content/ContentNavigationTree.vue' | ||
|
||
describe('ContentNavigationTree', () => { | ||
it('can mount component', async () => { | ||
const html = await renderSuspended(ContentNavigationTree) | ||
expect(html.html()).toMatchSnapshot() | ||
}) | ||
}) |
10 changes: 10 additions & 0 deletions
10
packages/nuxt/test/components/content/ContentSurround.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { describe, it, expect } from 'vitest' | ||
import { renderSuspended } from '@nuxt/test-utils/runtime' | ||
import ContentSurround from '../../src/runtime/components/content/ContentSurround.vue' | ||
|
||
describe('ContentSurround', () => { | ||
it('can mount component', async () => { | ||
const html = await renderSuspended(ContentSurround) | ||
expect(html.html()).toMatchSnapshot() | ||
}) | ||
}) |
10 changes: 10 additions & 0 deletions
10
packages/nuxt/test/components/content/ContentToc/ContentTocLinks.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { describe, it, expect } from 'vitest' | ||
import { renderSuspended } from '@nuxt/test-utils/runtime' | ||
import ContentTocLinks from '../../src/runtime/components/content/ContentToc/ContentTocLinks.vue' | ||
|
||
describe('ContentTocLinks', () => { | ||
it('can mount component', async () => { | ||
const html = await renderSuspended(ContentTocLinks) | ||
expect(html.html()).toMatchSnapshot() | ||
}) | ||
}) |
10 changes: 10 additions & 0 deletions
10
packages/nuxt/test/components/content/ContentToc/Index.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { describe, it, expect } from 'vitest' | ||
import { renderSuspended } from '@nuxt/test-utils/runtime' | ||
import Index from '../../src/runtime/components/content/ContentToc/Index.vue' | ||
|
||
describe('Index', () => { | ||
it('can mount component', async () => { | ||
const html = await renderSuspended(Index) | ||
expect(html.html()).toMatchSnapshot() | ||
}) | ||
}) |
7 changes: 7 additions & 0 deletions
7
packages/nuxt/test/components/content/ContentToc/__snapshots__/ContentTocLinks.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`ContentTocLinks > can mount component 1`] = ` | ||
"<div id="test-wrapper"> | ||
<ul class="space-y-2"></ul> | ||
</div>" | ||
`; |
12 changes: 12 additions & 0 deletions
12
packages/nuxt/test/components/content/ContentToc/__snapshots__/Index.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`Index > can mount component 1`] = ` | ||
"<div id="test-wrapper"> | ||
<div> | ||
<h2 class="text-xs/4 font-bold">On This Page</h2> | ||
<nav> | ||
<ul class="space-y-2"></ul> | ||
</nav> | ||
</div> | ||
</div>" | ||
`; |
12 changes: 12 additions & 0 deletions
12
packages/nuxt/test/components/content/__snapshots__/ContentSurround.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`ContentSurround > can mount component 1`] = ` | ||
"<div id="test-wrapper"> | ||
<div class="p-4"> | ||
<div class="flex justify-between"> | ||
<!--v-if--> | ||
<!--v-if--> | ||
</div> | ||
</div> | ||
</div>" | ||
`; |