debian-mirror-gitlab/spec/frontend/registry/explorer/pages/index_spec.js

29 lines
619 B
JavaScript
Raw Normal View History

2020-04-22 19:07:51 +05:30
import { shallowMount } from '@vue/test-utils';
import component from '~/registry/explorer/pages/index.vue';
2020-06-23 00:09:42 +05:30
import { createStore } from '~/registry/explorer/stores/';
2020-04-22 19:07:51 +05:30
describe('List Page', () => {
let wrapper;
2020-06-23 00:09:42 +05:30
let store;
2020-04-22 19:07:51 +05:30
const findRouterView = () => wrapper.find({ ref: 'router-view' });
const mountComponent = () => {
wrapper = shallowMount(component, {
store,
stubs: {
RouterView: true,
},
});
};
beforeEach(() => {
2020-06-23 00:09:42 +05:30
store = createStore();
2020-04-22 19:07:51 +05:30
mountComponent();
});
it('has a router view', () => {
expect(findRouterView().exists()).toBe(true);
});
});