UNPKG

bootstrap-vue

Version:

BootstrapVue, with over 40 plugins and more than 75 custom components, provides one of the most comprehensive implementations of Bootstrap v4 components and grid system for Vue.js. With extensive and automated WAI-ARIA accessibility markup.

37 lines (32 loc) 921 B
import { mount } from '@vue/test-utils' import BCardText from './card-text' describe('card-text', () => { it('has root element "p"', async () => { const wrapper = mount(BCardText) expect(wrapper.is('p')).toBe(true) }) it('has class card-text', async () => { const wrapper = mount(BCardText) expect(wrapper.classes()).toContain('card-text') }) it('has custom root element "div" when prop text-tag=div', async () => { const wrapper = mount(BCardText, { context: { props: { textTag: 'div' } } }) expect(wrapper.is('div')).toBe(true) expect(wrapper.classes()).toContain('card-text') }) it('accepts custom classes', async () => { const wrapper = mount(BCardText, { context: { class: ['foobar'] } }) expect(wrapper.classes()).toContain('card-text') expect(wrapper.classes()).toContain('foobar') }) })