summaryrefslogtreecommitdiff
path: root/spec/frontend/registry/explorer/pages/index_spec.js
blob: b558727ed5e5c0e5e5bd32dfea15e08c4676495b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { shallowMount } from '@vue/test-utils';
import component from '~/registry/explorer/pages/index.vue';
import store from '~/registry/explorer/stores/';

describe('List Page', () => {
  let wrapper;

  const findRouterView = () => wrapper.find({ ref: 'router-view' });

  const mountComponent = () => {
    wrapper = shallowMount(component, {
      store,
      stubs: {
        RouterView: true,
      },
    });
  };

  beforeEach(() => {
    mountComponent();
  });

  it('has a router view', () => {
    expect(findRouterView().exists()).toBe(true);
  });
});