From c2c8189b10037bdc3e9e31fa73242d169e1ca46b Mon Sep 17 00:00:00 2001 From: Winnie Hellmann Date: Mon, 8 Apr 2019 20:04:49 +0200 Subject: Enable ESLint rule jest/valid-describe --- spec/frontend/.eslintrc.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/frontend/.eslintrc.yml b/spec/frontend/.eslintrc.yml index 0e6ca11c1f8..ff18f0e4a2d 100644 --- a/spec/frontend/.eslintrc.yml +++ b/spec/frontend/.eslintrc.yml @@ -15,4 +15,5 @@ globals: rules: jest/no-identical-title: error jest/no-focused-tests: error + jest/valid-describe: error jest/no-jasmine-globals: error -- cgit v1.2.1 From 44d3590e36e8fb96f5cf4f97768ea4dfcb0450b9 Mon Sep 17 00:00:00 2001 From: Winnie Hellmann Date: Mon, 8 Apr 2019 20:06:14 +0200 Subject: Wrap file template mutation names in template strings --- .../ide/stores/modules/file_templates/mutations_spec.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/frontend/ide/stores/modules/file_templates/mutations_spec.js b/spec/frontend/ide/stores/modules/file_templates/mutations_spec.js index 8e0e3ae99a1..8e8b7f06ca2 100644 --- a/spec/frontend/ide/stores/modules/file_templates/mutations_spec.js +++ b/spec/frontend/ide/stores/modules/file_templates/mutations_spec.js @@ -9,7 +9,7 @@ describe('IDE file templates mutations', () => { state = createState(); }); - describe(types.REQUEST_TEMPLATE_TYPES, () => { + describe(`${types.REQUEST_TEMPLATE_TYPES}`, () => { it('sets isLoading', () => { mutations[types.REQUEST_TEMPLATE_TYPES](state); @@ -17,7 +17,7 @@ describe('IDE file templates mutations', () => { }); }); - describe(types.RECEIVE_TEMPLATE_TYPES_ERROR, () => { + describe(`${types.RECEIVE_TEMPLATE_TYPES_ERROR}`, () => { it('sets isLoading', () => { state.isLoading = true; @@ -27,7 +27,7 @@ describe('IDE file templates mutations', () => { }); }); - describe(types.RECEIVE_TEMPLATE_TYPES_SUCCESS, () => { + describe(`${types.RECEIVE_TEMPLATE_TYPES_SUCCESS}`, () => { it('sets isLoading to false', () => { state.isLoading = true; @@ -43,7 +43,7 @@ describe('IDE file templates mutations', () => { }); }); - describe(types.SET_SELECTED_TEMPLATE_TYPE, () => { + describe(`${types.SET_SELECTED_TEMPLATE_TYPE}`, () => { it('sets selectedTemplateType', () => { mutations[types.SET_SELECTED_TEMPLATE_TYPE](state, 'type'); @@ -59,7 +59,7 @@ describe('IDE file templates mutations', () => { }); }); - describe(types.SET_UPDATE_SUCCESS, () => { + describe(`${types.SET_UPDATE_SUCCESS}`, () => { it('sets updateSuccess', () => { mutations[types.SET_UPDATE_SUCCESS](state, true); -- cgit v1.2.1 From 84792c29ef6e65deae83c7d9dc97465ee9212981 Mon Sep 17 00:00:00 2001 From: Winnie Hellmann Date: Mon, 8 Apr 2019 20:07:20 +0200 Subject: Wrap import project mutation names in template strings --- spec/frontend/import_projects/store/mutations_spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/frontend/import_projects/store/mutations_spec.js b/spec/frontend/import_projects/store/mutations_spec.js index 8db8e9819ba..505545f7aa5 100644 --- a/spec/frontend/import_projects/store/mutations_spec.js +++ b/spec/frontend/import_projects/store/mutations_spec.js @@ -2,7 +2,7 @@ import * as types from '~/import_projects/store/mutation_types'; import mutations from '~/import_projects/store/mutations'; describe('import_projects store mutations', () => { - describe(types.RECEIVE_IMPORT_SUCCESS, () => { + describe(`${types.RECEIVE_IMPORT_SUCCESS}`, () => { it('removes repoId from reposBeingImported and providerRepos, adds to importedProjects', () => { const repoId = 1; const state = { @@ -20,7 +20,7 @@ describe('import_projects store mutations', () => { }); }); - describe(types.RECEIVE_JOBS_SUCCESS, () => { + describe(`${types.RECEIVE_JOBS_SUCCESS}`, () => { it('updates importStatus of existing importedProjects', () => { const repoId = 1; const state = { importedProjects: [{ id: repoId, importStatus: 'started' }] }; -- cgit v1.2.1 From 41c5733f557c2db74556b868e53b2742239880be Mon Sep 17 00:00:00 2001 From: Winnie Hellmann Date: Mon, 8 Apr 2019 20:09:37 +0200 Subject: Hard code test name in suggestion_diff_row_spec.js --- .../frontend/vue_shared/components/markdown/suggestion_diff_row_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/frontend/vue_shared/components/markdown/suggestion_diff_row_spec.js b/spec/frontend/vue_shared/components/markdown/suggestion_diff_row_spec.js index 866d6eb05c6..c8deac1c086 100644 --- a/spec/frontend/vue_shared/components/markdown/suggestion_diff_row_spec.js +++ b/spec/frontend/vue_shared/components/markdown/suggestion_diff_row_spec.js @@ -23,7 +23,7 @@ const newLine = { type: 'new', }; -describe(SuggestionDiffRow.name, () => { +describe('SuggestionDiffRow', () => { let wrapper; const factory = (options = {}) => { -- cgit v1.2.1 From 2704c4a588892e2d1928e0d772610cdaf0f8e760 Mon Sep 17 00:00:00 2001 From: Winnie Hellmann Date: Mon, 8 Apr 2019 20:16:46 +0200 Subject: Hard code test name in timeline_entry_item_spec.js --- .../javascripts/vue_shared/components/notes/timeline_entry_item.vue | 6 ------ .../vue_shared/components/notes/timeline_entry_item_spec.js | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/app/assets/javascripts/vue_shared/components/notes/timeline_entry_item.vue b/app/assets/javascripts/vue_shared/components/notes/timeline_entry_item.vue index 06974a12aed..f316c4fe112 100644 --- a/app/assets/javascripts/vue_shared/components/notes/timeline_entry_item.vue +++ b/app/assets/javascripts/vue_shared/components/notes/timeline_entry_item.vue @@ -1,9 +1,3 @@ - -