{"size": 857, "ext": "js", "max_stars_repo_path": "src/components/atoms/Grid/__tests__/GridRow.spec.js", "max_stars_repo_name": "dpsg-dv-osnabrueck/website-theme-2021", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/components/atoms/Grid/__tests__/GridRow.spec.js", "max_issues_repo_name": "dpsg-dv-osnabrueck/website-theme-2021", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/components/atoms/Grid/__tests__/GridRow.spec.js", "max_forks_repo_name": "dpsg-dv-osnabrueck/website-theme-2021", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 31.7407407407, "max_line_length": 92, "alphanum_fraction": 0.6126021004}
import GridRow from '@/components/atoms/Grid/GridRow.vue';
import { mount } from '@vue/test-utils';

describe('Grid row test', () => {
  const wrapper = mount(GridRow);

  test('Default', () => {
    expect(wrapper.html()).toContain('<div class="columns"></div>');
  });

  test('Custom gaps', async () => {
    wrapper.setProps({ gap: { mobile: '2' } });
    await wrapper.vm.$nextTick();
    expect(wrapper.attributes().class).toContain('is-variable is-2-mobile');
    expect(wrapper.html()).toContain('<div class="columns is-variable is-2-mobile"></div>');
  });

  test('Props with classes', () => {
    const { classNames } = wrapper.vm.$data;
    Object.keys(classNames).forEach(async (key) => {
      wrapper.setProps({ [key]: true });
      await wrapper.vm.$nextTick();
      expect(wrapper.classes()).toContain(classNames[key]);
    });
  });
});
