import { shallowMount } from '@vue/test-utils'; import radio from './radio'; describe('radio.vue', () => { it("Should render the 'text' prop value as a span value for the radio button label and add the 'value' prop value as the radio button value and id.", () => { // Act const wrapper = shallowMount(radio, { propsData: { value: '2023', text: '12' } }); // Assert expect(wrapper.find('span').text()).toEqual('12'); expect(wrapper.find('input').attributes()).toEqual({ class: 'position-absolute opacity-0', id: '2023', type: 'radio', value: '2023' }); }) })