Commit 37581695 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'winh-jest-valid-describe' into 'master'

Enable ESLint rule jest/valid-describe

See merge request gitlab-org/gitlab-ce!27140
parents af9b46f3 7a255af4
<script>
export default {
name: 'TimelineEntryItem',
};
</script>
<template> <template>
<li class="timeline-entry"> <li class="timeline-entry">
<div class="timeline-entry-inner"><slot></slot></div> <div class="timeline-entry-inner"><slot></slot></div>
......
...@@ -15,4 +15,5 @@ globals: ...@@ -15,4 +15,5 @@ globals:
rules: rules:
jest/no-identical-title: error jest/no-identical-title: error
jest/no-focused-tests: error jest/no-focused-tests: error
jest/valid-describe: error
jest/no-jasmine-globals: error jest/no-jasmine-globals: error
...@@ -9,7 +9,7 @@ describe('IDE file templates mutations', () => { ...@@ -9,7 +9,7 @@ describe('IDE file templates mutations', () => {
state = createState(); state = createState();
}); });
describe(types.REQUEST_TEMPLATE_TYPES, () => { describe(`${types.REQUEST_TEMPLATE_TYPES}`, () => {
it('sets isLoading', () => { it('sets isLoading', () => {
mutations[types.REQUEST_TEMPLATE_TYPES](state); mutations[types.REQUEST_TEMPLATE_TYPES](state);
...@@ -17,7 +17,7 @@ describe('IDE file templates mutations', () => { ...@@ -17,7 +17,7 @@ describe('IDE file templates mutations', () => {
}); });
}); });
describe(types.RECEIVE_TEMPLATE_TYPES_ERROR, () => { describe(`${types.RECEIVE_TEMPLATE_TYPES_ERROR}`, () => {
it('sets isLoading', () => { it('sets isLoading', () => {
state.isLoading = true; state.isLoading = true;
...@@ -27,7 +27,7 @@ describe('IDE file templates mutations', () => { ...@@ -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', () => { it('sets isLoading to false', () => {
state.isLoading = true; state.isLoading = true;
...@@ -43,7 +43,7 @@ describe('IDE file templates mutations', () => { ...@@ -43,7 +43,7 @@ describe('IDE file templates mutations', () => {
}); });
}); });
describe(types.SET_SELECTED_TEMPLATE_TYPE, () => { describe(`${types.SET_SELECTED_TEMPLATE_TYPE}`, () => {
it('sets selectedTemplateType', () => { it('sets selectedTemplateType', () => {
mutations[types.SET_SELECTED_TEMPLATE_TYPE](state, 'type'); mutations[types.SET_SELECTED_TEMPLATE_TYPE](state, 'type');
...@@ -59,7 +59,7 @@ describe('IDE file templates mutations', () => { ...@@ -59,7 +59,7 @@ describe('IDE file templates mutations', () => {
}); });
}); });
describe(types.SET_UPDATE_SUCCESS, () => { describe(`${types.SET_UPDATE_SUCCESS}`, () => {
it('sets updateSuccess', () => { it('sets updateSuccess', () => {
mutations[types.SET_UPDATE_SUCCESS](state, true); mutations[types.SET_UPDATE_SUCCESS](state, true);
......
...@@ -2,7 +2,7 @@ import * as types from '~/import_projects/store/mutation_types'; ...@@ -2,7 +2,7 @@ import * as types from '~/import_projects/store/mutation_types';
import mutations from '~/import_projects/store/mutations'; import mutations from '~/import_projects/store/mutations';
describe('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', () => { it('removes repoId from reposBeingImported and providerRepos, adds to importedProjects', () => {
const repoId = 1; const repoId = 1;
const state = { const state = {
...@@ -20,7 +20,7 @@ describe('import_projects store mutations', () => { ...@@ -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', () => { it('updates importStatus of existing importedProjects', () => {
const repoId = 1; const repoId = 1;
const state = { importedProjects: [{ id: repoId, importStatus: 'started' }] }; const state = { importedProjects: [{ id: repoId, importStatus: 'started' }] };
......
...@@ -23,7 +23,7 @@ const newLine = { ...@@ -23,7 +23,7 @@ const newLine = {
type: 'new', type: 'new',
}; };
describe(SuggestionDiffRow.name, () => { describe('SuggestionDiffRow', () => {
let wrapper; let wrapper;
const factory = (options = {}) => { const factory = (options = {}) => {
......
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount, createLocalVue } from '@vue/test-utils';
import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue'; import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue';
describe(TimelineEntryItem.name, () => { describe(`TimelineEntryItem`, () => {
let wrapper; let wrapper;
const factory = (options = {}) => { const factory = (options = {}) => {
......
...@@ -2,7 +2,7 @@ import mutations from '~/vuex_shared/modules/modal/mutations'; ...@@ -2,7 +2,7 @@ import mutations from '~/vuex_shared/modules/modal/mutations';
import * as types from '~/vuex_shared/modules/modal/mutation_types'; import * as types from '~/vuex_shared/modules/modal/mutation_types';
describe('Vuex ModalModule mutations', () => { describe('Vuex ModalModule mutations', () => {
describe(types.SHOW, () => { describe(`${types.SHOW}`, () => {
it('sets isVisible to true', () => { it('sets isVisible to true', () => {
const state = { const state = {
isVisible: false, isVisible: false,
...@@ -16,7 +16,7 @@ describe('Vuex ModalModule mutations', () => { ...@@ -16,7 +16,7 @@ describe('Vuex ModalModule mutations', () => {
}); });
}); });
describe(types.HIDE, () => { describe(`${types.HIDE}`, () => {
it('sets isVisible to false', () => { it('sets isVisible to false', () => {
const state = { const state = {
isVisible: true, isVisible: true,
...@@ -30,7 +30,7 @@ describe('Vuex ModalModule mutations', () => { ...@@ -30,7 +30,7 @@ describe('Vuex ModalModule mutations', () => {
}); });
}); });
describe(types.OPEN, () => { describe(`${types.OPEN}`, () => {
it('sets data and sets isVisible to true', () => { it('sets data and sets isVisible to true', () => {
const data = { id: 7 }; const data = { id: 7 };
const state = { const state = {
......
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