Commit d9f62795 authored by Paul Slaughter's avatar Paul Slaughter

Merge branch 'vs-migrate-storage-counters-to-jest' into 'master'

Migrate storage_counter specs to Jest

Closes #194308

See merge request gitlab-org/gitlab!26743
parents bd8fba86 0125b47a
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import StorageApp from 'ee/storage_counter/components/app.vue';
import Project from 'ee/storage_counter/components/project.vue';
import { projects, withRootStorageStatistics } from '../data';
const localVue = createLocalVue();
describe('Storage counter app', () => {
let wrapper;
......@@ -17,10 +15,9 @@ describe('Storage counter app', () => {
},
};
wrapper = shallowMount(localVue.extend(StorageApp), {
wrapper = shallowMount(StorageApp, {
propsData: { namespacePath: 'h5bp', helpPagePath: 'help' },
mocks: { $apollo },
localVue,
});
}
......
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import { GlButton } from '@gitlab/ui';
import Project from 'ee/storage_counter/components/project.vue';
import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue';
......@@ -22,14 +22,11 @@ const data = {
},
};
const localVue = createLocalVue();
function factory(project) {
wrapper = shallowMount(localVue.extend(Project), {
wrapper = shallowMount(Project, {
propsData: {
project,
},
localVue,
});
}
......
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import StorageRow from 'ee/storage_counter/components/storage_row.vue';
import { numberToHumanSize } from '~/lib/utils/number_utils';
......@@ -7,15 +7,13 @@ const data = {
name: 'LFS Package',
value: 1293346,
};
const localVue = createLocalVue();
function factory({ name, value }) {
wrapper = shallowMount(localVue.extend(StorageRow), {
wrapper = shallowMount(StorageRow, {
propsData: {
name,
value,
},
localVue,
});
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment