test(checkbox): checkbox may not have label this test is no need (#4955)

* test(checkbox): checkbox may not have label this test is no need

* fix: lint
This commit is contained in:
Sepush 2023-06-14 21:57:36 +08:00 committed by GitHub
parent 755854ae0d
commit 15219169c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 12 deletions

View File

@ -212,15 +212,6 @@ describe('n-checkbox', () => {
)
wrapper.unmount()
})
it('should allow to set aria-labelledby from outside', () => {
const wrapper = mount(NCheckbox)
const labelId = wrapper.find('.n-checkbox__label').attributes('id')
expect(wrapper.find('.n-checkbox').attributes('aria-labelledby')).toBe(
labelId
)
wrapper.unmount()
})
})
})

View File

@ -3,7 +3,7 @@ import { mount } from '@vue/test-utils'
import { NSpin } from '../index'
import { Reload } from '@vicons/ionicons5'
import { NIcon } from '../../icon'
import { sleep } from 'seemly'
describe('n-spin', () => {
it('should work with import on demand', () => {
mount(NSpin)
@ -104,7 +104,7 @@ describe('n-spin', () => {
expect(wrapper.find('.n-spin-content').classes()).not.toContain(
'n-spin-content--spinning'
)
await new Promise<void>((resolve) => setTimeout(() => resolve(), 1000))
await sleep(1000)
expect(wrapper.find('.n-spin-content').classes()).toContain(
'n-spin-content--spinning'
@ -124,7 +124,7 @@ describe('n-spin', () => {
expect(wrapper.find('.n-spin-content').classes()).not.toContain(
'n-spin-content--spinning'
)
await new Promise<void>((resolve) => setTimeout(() => resolve(), 1000))
await sleep(1000)
expect(wrapper.find('.n-spin-content').classes()).toContain(
'n-spin-content--spinning'

1
volar.d.ts vendored
View File

@ -141,6 +141,7 @@ declare module 'vue' {
NUploadTrigger: typeof import('naive-ui')['NUploadTrigger']
NWatermark: typeof import('naive-ui')['NWatermark']
NEquation: typeof import('naive-ui')['NEquation']
NPerformantEllipsis: typeof import('naive-ui')['NPerformantEllipsis']
}
}
export {}