Commit b82b8fd3 authored by Illya Klymov's avatar Illya Klymov

Improve ide/components/pipelines/list_spec spec

- remove deprecated `methods`
- migrate to promise-based `it`
parent 4ab9b3ea
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex'; import Vuex from 'vuex';
import { GlLoadingIcon, GlTab } from '@gitlab/ui'; import { GlLoadingIcon, GlTab } from '@gitlab/ui';
import { TEST_HOST } from 'helpers/test_constants'; import { TEST_HOST } from 'helpers/test_constants';
...@@ -8,8 +9,7 @@ import JobsList from '~/ide/components/jobs/list.vue'; ...@@ -8,8 +9,7 @@ import JobsList from '~/ide/components/jobs/list.vue';
import CiIcon from '~/vue_shared/components/ci_icon.vue'; import CiIcon from '~/vue_shared/components/ci_icon.vue';
import IDEServices from '~/ide/services'; import IDEServices from '~/ide/services';
const localVue = createLocalVue(); Vue.use(Vuex);
localVue.use(Vuex);
jest.mock('~/ide/services', () => ({ jest.mock('~/ide/services', () => ({
pingUsage: jest.fn(), pingUsage: jest.fn(),
...@@ -59,9 +59,6 @@ describe('IDE pipelines list', () => { ...@@ -59,9 +59,6 @@ describe('IDE pipelines list', () => {
failedStages: failedStagesGetterMock, failedStages: failedStagesGetterMock,
pipelineFailed: () => false, pipelineFailed: () => false,
}, },
methods: {
fetchLatestPipeline: jest.fn(),
},
}, },
}, },
}); });
...@@ -69,7 +66,6 @@ describe('IDE pipelines list', () => { ...@@ -69,7 +66,6 @@ describe('IDE pipelines list', () => {
const createComponent = (state = {}, pipelinesState = {}) => { const createComponent = (state = {}, pipelinesState = {}) => {
wrapper = shallowMount(List, { wrapper = shallowMount(List, {
localVue,
store: createStore(state, pipelinesState), store: createStore(state, pipelinesState),
}); });
}; };
......
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