summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2019-04-08 19:51:25 +0000
committerMike Greiling <mike@pixelcog.com>2019-04-08 19:51:25 +0000
commit5134fef942e83adc15ec05c689ab5513974aaf5e (patch)
treedad023dd0c04715e47f85b9cb9ece583f980e9f4
parent746a6faa234a5240a8d93c425a9f57f1a323fd4b (diff)
parentd3257e2cbc047de5da69cabd210d2b885092f5d2 (diff)
downloadgitlab-ce-5134fef942e83adc15ec05c689ab5513974aaf5e.tar.gz
Merge branch 'winh-jest-no-focused-tests' into 'master'
Enable ESLint rule jest/no-focused-tests See merge request gitlab-org/gitlab-ce!27132
-rw-r--r--spec/frontend/.eslintrc.yml2
-rw-r--r--spec/frontend/serverless/components/functions_spec.js14
2 files changed, 11 insertions, 5 deletions
diff --git a/spec/frontend/.eslintrc.yml b/spec/frontend/.eslintrc.yml
index 054dc27cda6..30b559c2363 100644
--- a/spec/frontend/.eslintrc.yml
+++ b/spec/frontend/.eslintrc.yml
@@ -12,3 +12,5 @@ globals:
loadFixtures: false
preloadFixtures: false
setFixtures: false
+rules:
+ jest/no-focused-tests: error
diff --git a/spec/frontend/serverless/components/functions_spec.js b/spec/frontend/serverless/components/functions_spec.js
index 5533de1a70a..7af33ceaadc 100644
--- a/spec/frontend/serverless/components/functions_spec.js
+++ b/spec/frontend/serverless/components/functions_spec.js
@@ -4,14 +4,21 @@ import axios from '~/lib/utils/axios_utils';
import functionsComponent from '~/serverless/components/functions.vue';
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { createStore } from '~/serverless/store';
+import { TEST_HOST } from 'helpers/test_constants';
import { mockServerlessFunctions } from '../mock_data';
describe('functionsComponent', () => {
+ const statusPath = `${TEST_HOST}/statusPath`;
+
let component;
let store;
let localVue;
+ let axiosMock;
beforeEach(() => {
+ axiosMock = new AxiosMockAdapter(axios);
+ axiosMock.onGet(statusPath).reply(200);
+
localVue = createLocalVue();
localVue.use(Vuex);
@@ -20,6 +27,7 @@ describe('functionsComponent', () => {
afterEach(() => {
component.vm.$destroy();
+ axiosMock.restore();
});
it('should render empty state when Knative is not installed', () => {
@@ -80,11 +88,7 @@ describe('functionsComponent', () => {
);
});
- fit('should render the functions list', () => {
- const statusPath = 'statusPath';
- const axiosMock = new AxiosMockAdapter(axios);
- axiosMock.onGet(statusPath).reply(200);
-
+ it('should render the functions list', () => {
component = shallowMount(functionsComponent, {
localVue,
store,