Skip to content

Commit 476e96f

Browse files
committed
tests: fix
1 parent f0c41c2 commit 476e96f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/nuxt/a11y.spec.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ vi.mock('vue-data-ui/vue-ui-xy', () => {
113113
}
114114
})
115115

116+
vi.mock('~/composables/useCanGoBack', () => {
117+
return {
118+
useCanGoBack: () => shallowRef(true),
119+
}
120+
})
121+
116122
// Import components from #components where possible
117123
// For server/client variants, we need to import directly to test the specific variant
118124
import {
@@ -461,6 +467,7 @@ describe('component accessibility audits', () => {
461467
describe('BackButton', () => {
462468
it('should have no accessibility violations', async () => {
463469
const component = await mountSuspended(BackButton)
470+
expect(component.find('button').exists()).toBe(true)
464471
const results = await runAxe(component)
465472
expect(results.violations).toEqual([])
466473
})

0 commit comments

Comments
 (0)