forked from npmx-dev/npmx.dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppFooter.spec.ts
More file actions
27 lines (25 loc) · 992 Bytes
/
AppFooter.spec.ts
File metadata and controls
27 lines (25 loc) · 992 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { describe, expect, it } from 'vitest'
import { mountSuspended } from '@nuxt/test-utils/runtime'
import AppFooter from '~/components/AppFooter.vue'
describe('AppFooter', () => {
it('BuildEnvironment is properly displayed at settings', async () => {
const component = await mountSuspended(AppFooter, {
route: '/settings',
})
const html = component.html()
expect(html).toContain('<span class="tracking-wider">dev</span>')
expect(html).toContain(
'<a href="https://github.com/npmx-dev/npmx.dev/commit/704987bba88909f3782d792c224bde989569acb9"',
)
})
it('BuildEnvironment is hidden at home', async () => {
const component = await mountSuspended(AppFooter, {
route: '/',
})
const html = component.html()
expect(html).not.toContain(
'<a href="https://github.com/npmx-dev/npmx.dev/commit/704987bba88909f3782d792c224bde989569acb9"',
)
expect(html).not.toContain('<span class="tracking-wider">dev</span>')
})
})