Skip to content

Commit 827ebd7

Browse files
committed
add AppLogo test in a11y.spec.ts
1 parent aef755e commit 827ebd7

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

test/nuxt/a11y.spec.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ afterEach(() => {
5656
// For server/client variants, we need to import directly to test the specific variant
5757
import {
5858
AppFooter,
59+
AppLogo,
5960
AppHeader,
6061
UserAvatar,
6162
BuildEnvironment,
@@ -179,6 +180,22 @@ describe('component accessibility audits', () => {
179180
})
180181
})
181182

183+
describe('AppLogo', () => {
184+
it('should have no accessibility violations', async () => {
185+
const component = await mountSuspended(AppLogo)
186+
const results = await runAxe(component)
187+
expect(results.violations).toEqual([])
188+
})
189+
190+
it('should have no accessibility violations with custom class', async () => {
191+
const component = await mountSuspended(AppLogo, {
192+
props: { class: 'h-6 w-6 text-accent' },
193+
})
194+
const results = await runAxe(component)
195+
expect(results.violations).toEqual([])
196+
})
197+
})
198+
182199
describe('AppHeader', () => {
183200
it('should have no accessibility violations', async () => {
184201
const component = await mountSuspended(AppHeader)

0 commit comments

Comments
 (0)