cara menguji util tes vue rendering bersyarat

test('does not render an element', () => {
  const wrapper = mount(Component)

  // testing that an element is not rendered
  expect(wrapper.find('[data-test="tested-element"]').exists()).toBe(false)
  
  // testing that an element is rendered
  expect(wrapper.find('[data-test="tested-element"]').exists()).toBe(true)
})
Perfect Pigeon