test(tabs): empyt tab pane

This commit is contained in:
07akioni 2021-07-08 09:37:41 +08:00
parent e693ceec75
commit c44d38c37d

View File

@ -1,5 +1,6 @@
import { mount } from '@vue/test-utils'
import { NTabs } from '../index'
import { h } from 'vue'
import { NTabPane, NTabs } from '../index'
describe('n-tabs', () => {
it('should work with import on demand', () => {
@ -25,4 +26,18 @@ describe('n-tabs', () => {
}
})
})
it('should work with empty tab-pane', () => {
mount(NTabs, {
props: {
defaultValue: 'a'
},
slots: {
default: () =>
h(NTabPane, {
tab: 'a',
name: 'a'
})
}
})
})
})