diff options
author | Kushal Pandya <kushalspandya@gmail.com> | 2019-04-10 13:13:10 +0000 |
---|---|---|
committer | Kushal Pandya <kushalspandya@gmail.com> | 2019-04-10 13:13:10 +0000 |
commit | 375816953700398ad1d7a68365650dfc643e1cbd (patch) | |
tree | 198606dff762d8de161711a10c7d5f758fd5e570 | |
parent | af9b46f3bea10b7897f519bb5b680075c79b5b80 (diff) | |
parent | 7a255af451a1755a9cc3fc2902ba414d9b5a5f07 (diff) | |
download | gitlab-ce-375816953700398ad1d7a68365650dfc643e1cbd.tar.gz |
Merge branch 'winh-jest-valid-describe' into 'master'
Enable ESLint rule jest/valid-describe
See merge request gitlab-org/gitlab-ce!27140
7 files changed, 13 insertions, 18 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 @@ -<script> -export default { - name: 'TimelineEntryItem', -}; -</script> - <template> <li class="timeline-entry"> <div class="timeline-entry-inner"><slot></slot></div> 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 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); 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' }] }; 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 = {}) => { diff --git a/spec/frontend/vue_shared/components/notes/timeline_entry_item_spec.js b/spec/frontend/vue_shared/components/notes/timeline_entry_item_spec.js index c15635f2105..be6c58f0683 100644 --- a/spec/frontend/vue_shared/components/notes/timeline_entry_item_spec.js +++ b/spec/frontend/vue_shared/components/notes/timeline_entry_item_spec.js @@ -1,7 +1,7 @@ import { shallowMount, createLocalVue } from '@vue/test-utils'; import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue'; -describe(TimelineEntryItem.name, () => { +describe(`TimelineEntryItem`, () => { let wrapper; const factory = (options = {}) => { diff --git a/spec/frontend/vuex_shared/modules/modal/mutations_spec.js b/spec/frontend/vuex_shared/modules/modal/mutations_spec.js index d07f8ba1e65..eaaf196d1ec 100644 --- a/spec/frontend/vuex_shared/modules/modal/mutations_spec.js +++ b/spec/frontend/vuex_shared/modules/modal/mutations_spec.js @@ -2,7 +2,7 @@ import mutations from '~/vuex_shared/modules/modal/mutations'; import * as types from '~/vuex_shared/modules/modal/mutation_types'; describe('Vuex ModalModule mutations', () => { - describe(types.SHOW, () => { + describe(`${types.SHOW}`, () => { it('sets isVisible to true', () => { const state = { isVisible: false, @@ -16,7 +16,7 @@ describe('Vuex ModalModule mutations', () => { }); }); - describe(types.HIDE, () => { + describe(`${types.HIDE}`, () => { it('sets isVisible to false', () => { const state = { isVisible: true, @@ -30,7 +30,7 @@ describe('Vuex ModalModule mutations', () => { }); }); - describe(types.OPEN, () => { + describe(`${types.OPEN}`, () => { it('sets data and sets isVisible to true', () => { const data = { id: 7 }; const state = { |