![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/vreg/node_modules/bootstrap-vue/src/components/card/ |
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.element.tagName).toBe('P') wrapper.destroy() }) it('has class card-text', async () => { const wrapper = mount(BCardText) expect(wrapper.classes()).toContain('card-text') wrapper.destroy() }) it('has custom root element "div" when prop text-tag=div', async () => { const wrapper = mount(BCardText, { context: { props: { textTag: 'div' } } }) expect(wrapper.element.tagName).toBe('DIV') expect(wrapper.classes()).toContain('card-text') wrapper.destroy() }) it('accepts custom classes', async () => { const wrapper = mount(BCardText, { context: { class: ['foobar'] } }) expect(wrapper.classes()).toContain('card-text') expect(wrapper.classes()).toContain('foobar') wrapper.destroy() }) })