mirror of
https://github.com/nuxt/ui.git
synced 2026-09-14 19:51:10 +08:00
7d1e8631ea
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
22 lines
709 B
TypeScript
22 lines
709 B
TypeScript
import { describe, it, expect } from 'vitest'
|
|
import { axe } from 'vitest-axe'
|
|
import { mountSuspended } from '@nuxt/test-utils/runtime'
|
|
import { renderEach } from '../component-render'
|
|
import DashboardGroup from '../../src/runtime/components/DashboardGroup.vue'
|
|
|
|
describe('DashboardGroup', () => {
|
|
renderEach(DashboardGroup, [
|
|
// Props
|
|
['with as', { props: { as: 'section' } }],
|
|
['with class', { props: { class: 'inset-4' } }],
|
|
// Slots
|
|
['with default slot', { slots: { default: () => 'Default slot' } }]
|
|
])
|
|
|
|
it('passes accessibility tests', async () => {
|
|
const wrapper = await mountSuspended(DashboardGroup)
|
|
|
|
expect(await axe(wrapper.element)).toHaveNoViolations()
|
|
})
|
|
})
|