mikewlange
8/15/2019 - 5:37 PM

test function

import { mount } from '@vue/test-utils';
import FakeComponent from '../components/FakeComponent.vue';

// The component
describe('FakeComponent', () => {
// what the test needs to do
  test('it should display the right number of table rows', () => {
//wrap the component
    const wrapper = mount(FakeComponent);
// bool expect the outcome. 
    expect(
      wrapper.findAll('[data-test="fake-table-row"]').wrappers.length
    ).toBe(2);
  });
})