![]() 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 { BCardGroup } from './card-group' describe('card-group', () => { it('has root element "div"', async () => { const wrapper = mount(BCardGroup) expect(wrapper.element.tagName).toBe('DIV') wrapper.destroy() }) it('has class card-group', async () => { const wrapper = mount(BCardGroup) expect(wrapper.classes()).toContain('card-group') expect(wrapper.classes().length).toBe(1) wrapper.destroy() }) it('has custom root element when prop tag is set', async () => { const wrapper = mount(BCardGroup, { context: { props: { tag: 'article' } } }) expect(wrapper.element.tagName).toBe('ARTICLE') expect(wrapper.classes()).toContain('card-group') wrapper.destroy() }) it('has class card-deck when prop deck=true', async () => { const wrapper = mount(BCardGroup, { context: { props: { deck: true } } }) expect(wrapper.classes()).toContain('card-deck') expect(wrapper.classes().length).toBe(1) wrapper.destroy() }) it('has class card-columns when prop columns=true', async () => { const wrapper = mount(BCardGroup, { context: { props: { columns: true } } }) expect(wrapper.classes()).toContain('card-columns') expect(wrapper.classes().length).toBe(1) wrapper.destroy() }) it('accepts custom classes', async () => { const wrapper = mount(BCardGroup, { context: { class: ['foobar'] } }) expect(wrapper.classes()).toContain('card-group') expect(wrapper.classes()).toContain('foobar') wrapper.destroy() }) })