bootstrap-vue
Version:
With more than 85 components, over 45 available plugins, several directives, and 1000+ icons, BootstrapVue provides one of the most comprehensive implementations of the Bootstrap v4 component and grid system available for Vue.js v2.6, complete with extens
31 lines (24 loc) • 788 B
JavaScript
import { mount } from '@vue/test-utils'
import { BNavText } from './nav-text'
describe('nav > nav-text', () => {
it('has expected default structure', async () => {
const wrapper = mount(BNavText)
expect(wrapper.element.tagName).toBe('LI')
expect(wrapper.classes()).toContain('navbar-text')
expect(wrapper.classes().length).toBe(1)
expect(wrapper.text()).toEqual('')
wrapper.destroy()
})
it('renders default slot content', async () => {
const wrapper = mount(BNavText, {
slots: {
default: 'foobar'
}
})
expect(wrapper.element.tagName).toBe('LI')
expect(wrapper.classes()).toContain('navbar-text')
expect(wrapper.classes().length).toBe(1)
expect(wrapper.text()).toEqual('foobar')
wrapper.destroy()
})
})