Enable ESLint rule jest/no-focused-tests
This commit is contained in:
parent
746a6faa23
commit
d3257e2cbc
|
@ -12,3 +12,5 @@ globals:
|
||||||
loadFixtures: false
|
loadFixtures: false
|
||||||
preloadFixtures: false
|
preloadFixtures: false
|
||||||
setFixtures: false
|
setFixtures: false
|
||||||
|
rules:
|
||||||
|
jest/no-focused-tests: error
|
||||||
|
|
|
@ -4,14 +4,21 @@ import axios from '~/lib/utils/axios_utils';
|
||||||
import functionsComponent from '~/serverless/components/functions.vue';
|
import functionsComponent from '~/serverless/components/functions.vue';
|
||||||
import { createLocalVue, shallowMount } from '@vue/test-utils';
|
import { createLocalVue, shallowMount } from '@vue/test-utils';
|
||||||
import { createStore } from '~/serverless/store';
|
import { createStore } from '~/serverless/store';
|
||||||
|
import { TEST_HOST } from 'helpers/test_constants';
|
||||||
import { mockServerlessFunctions } from '../mock_data';
|
import { mockServerlessFunctions } from '../mock_data';
|
||||||
|
|
||||||
describe('functionsComponent', () => {
|
describe('functionsComponent', () => {
|
||||||
|
const statusPath = `${TEST_HOST}/statusPath`;
|
||||||
|
|
||||||
let component;
|
let component;
|
||||||
let store;
|
let store;
|
||||||
let localVue;
|
let localVue;
|
||||||
|
let axiosMock;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
axiosMock = new AxiosMockAdapter(axios);
|
||||||
|
axiosMock.onGet(statusPath).reply(200);
|
||||||
|
|
||||||
localVue = createLocalVue();
|
localVue = createLocalVue();
|
||||||
localVue.use(Vuex);
|
localVue.use(Vuex);
|
||||||
|
|
||||||
|
@ -20,6 +27,7 @@ describe('functionsComponent', () => {
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
component.vm.$destroy();
|
component.vm.$destroy();
|
||||||
|
axiosMock.restore();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render empty state when Knative is not installed', () => {
|
it('should render empty state when Knative is not installed', () => {
|
||||||
|
@ -80,11 +88,7 @@ describe('functionsComponent', () => {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
fit('should render the functions list', () => {
|
it('should render the functions list', () => {
|
||||||
const statusPath = 'statusPath';
|
|
||||||
const axiosMock = new AxiosMockAdapter(axios);
|
|
||||||
axiosMock.onGet(statusPath).reply(200);
|
|
||||||
|
|
||||||
component = shallowMount(functionsComponent, {
|
component = shallowMount(functionsComponent, {
|
||||||
localVue,
|
localVue,
|
||||||
store,
|
store,
|
||||||
|
|
Loading…
Reference in New Issue