fixed eslint
This commit is contained in:
parent
fa8c82c7ec
commit
d4fce4dc2f
3 changed files with 18 additions and 19 deletions
|
@ -1,4 +1,3 @@
|
||||||
import { normalizeHeaders } from '~/lib/utils/common_utils';
|
|
||||||
import { __ } from '../../../locale';
|
import { __ } from '../../../locale';
|
||||||
import eventHub from '../../eventhub';
|
import eventHub from '../../eventhub';
|
||||||
import service from '../../services';
|
import service from '../../services';
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import store from '~/ide/stores';
|
import store from '~/ide/stores';
|
||||||
import service from '~/ide/services';
|
|
||||||
import router from '~/ide/ide_router';
|
import router from '~/ide/ide_router';
|
||||||
import repoCommitSection from '~/ide/components/repo_commit_section.vue';
|
import repoCommitSection from '~/ide/components/repo_commit_section.vue';
|
||||||
import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper';
|
import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper';
|
||||||
|
|
|
@ -2,7 +2,6 @@ import Vue from 'vue';
|
||||||
import MockAdapter from 'axios-mock-adapter';
|
import MockAdapter from 'axios-mock-adapter';
|
||||||
import axios from '~/lib/utils/axios_utils';
|
import axios from '~/lib/utils/axios_utils';
|
||||||
import store from '~/ide/stores';
|
import store from '~/ide/stores';
|
||||||
import { getFileData, getRawFileData } from '~/ide/stores/actions/file';
|
|
||||||
import * as actions from '~/ide/stores/actions/file';
|
import * as actions from '~/ide/stores/actions/file';
|
||||||
import * as types from '~/ide/stores/mutation_types';
|
import * as types from '~/ide/stores/mutation_types';
|
||||||
import service from '~/ide/services';
|
import service from '~/ide/services';
|
||||||
|
@ -293,14 +292,15 @@ describe('IDE store file actions', () => {
|
||||||
it('dispatches error action', done => {
|
it('dispatches error action', done => {
|
||||||
const dispatch = jasmine.createSpy('dispatch');
|
const dispatch = jasmine.createSpy('dispatch');
|
||||||
|
|
||||||
getFileData(
|
actions
|
||||||
{
|
.getFileData(
|
||||||
state: store.state,
|
{
|
||||||
commit() {},
|
state: store.state,
|
||||||
dispatch,
|
commit() {},
|
||||||
},
|
dispatch,
|
||||||
{ path: localFile.path },
|
},
|
||||||
)
|
{ path: localFile.path },
|
||||||
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
expect(dispatch).toHaveBeenCalledWith('setErrorMessage', {
|
expect(dispatch).toHaveBeenCalledWith('setErrorMessage', {
|
||||||
text: 'An error occured whilst loading the file.',
|
text: 'An error occured whilst loading the file.',
|
||||||
|
@ -381,14 +381,15 @@ describe('IDE store file actions', () => {
|
||||||
it('dispatches error action', done => {
|
it('dispatches error action', done => {
|
||||||
const dispatch = jasmine.createSpy('dispatch');
|
const dispatch = jasmine.createSpy('dispatch');
|
||||||
|
|
||||||
getRawFileData(
|
actions
|
||||||
{
|
.getRawFileData(
|
||||||
state: store.state,
|
{
|
||||||
commit() {},
|
state: store.state,
|
||||||
dispatch,
|
commit() {},
|
||||||
},
|
dispatch,
|
||||||
{ path: tmpFile.path, baseSha: tmpFile.baseSha },
|
},
|
||||||
)
|
{ path: tmpFile.path, baseSha: tmpFile.baseSha },
|
||||||
|
)
|
||||||
.then(done.fail)
|
.then(done.fail)
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
expect(dispatch).toHaveBeenCalledWith('setErrorMessage', {
|
expect(dispatch).toHaveBeenCalledWith('setErrorMessage', {
|
||||||
|
|
Loading…
Reference in a new issue