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

25 lines
507 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';
describe('List Page', () => {
let wrapper;
const findRouterView = () => wrapper.find({ ref: 'router-view' });
const mountComponent = () => {
wrapper = shallowMount(component, {
stubs: {
RouterView: true,
},
});
};
beforeEach(() => {
mountComponent();
});
it('has a router view', () => {
expect(findRouterView().exists()).toBe(true);
});
});