diff options
Diffstat (limited to 'spec/frontend/ide/stores/actions/project_spec.js')
-rw-r--r-- | spec/frontend/ide/stores/actions/project_spec.js | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/spec/frontend/ide/stores/actions/project_spec.js b/spec/frontend/ide/stores/actions/project_spec.js index ca3687307a9..1244c8af91a 100644 --- a/spec/frontend/ide/stores/actions/project_spec.js +++ b/spec/frontend/ide/stores/actions/project_spec.js @@ -53,7 +53,7 @@ describe('IDE store project actions', () => { }); }); - it('calls the service', done => { + it('calls the service', (done) => { store .dispatch('refreshLastCommitData', { projectId: store.state.currentProjectId, @@ -67,7 +67,7 @@ describe('IDE store project actions', () => { .catch(done.fail); }); - it('commits getBranchData', done => { + it('commits getBranchData', (done) => { testAction( refreshLastCommitData, { @@ -94,7 +94,7 @@ describe('IDE store project actions', () => { }); describe('showBranchNotFoundError', () => { - it('dispatches setErrorMessage', done => { + it('dispatches setErrorMessage', (done) => { testAction( showBranchNotFoundError, 'master', @@ -123,7 +123,7 @@ describe('IDE store project actions', () => { jest.spyOn(api, 'createBranch').mockResolvedValue(); }); - it('calls API', done => { + it('calls API', (done) => { createNewBranchFromDefault( { state: { @@ -148,7 +148,7 @@ describe('IDE store project actions', () => { .catch(done.fail); }); - it('clears error message', done => { + it('clears error message', (done) => { const dispatchSpy = jest.fn().mockName('dispatch'); createNewBranchFromDefault( @@ -172,7 +172,7 @@ describe('IDE store project actions', () => { .catch(done.fail); }); - it('reloads window', done => { + it('reloads window', (done) => { createNewBranchFromDefault( { state: { @@ -196,7 +196,7 @@ describe('IDE store project actions', () => { }); describe('loadEmptyBranch', () => { - it('creates a blank tree and sets loading state to false', done => { + it('creates a blank tree and sets loading state to false', (done) => { testAction( loadEmptyBranch, { projectId: TEST_PROJECT_ID, branchId: 'master' }, @@ -213,7 +213,7 @@ describe('IDE store project actions', () => { ); }); - it('does nothing, if tree already exists', done => { + it('does nothing, if tree already exists', (done) => { const trees = { [`${TEST_PROJECT_ID}/master`]: [] }; testAction( @@ -279,7 +279,7 @@ describe('IDE store project actions', () => { const branchId = '123-lorem'; const ref = 'abcd2322'; - it('when empty repo, loads empty branch', done => { + it('when empty repo, loads empty branch', (done) => { const mockGetters = { emptyRepo: true }; testAction( @@ -292,13 +292,13 @@ describe('IDE store project actions', () => { ); }); - it('when branch already exists, does nothing', done => { + it('when branch already exists, does nothing', (done) => { store.state.projects[projectId].branches[branchId] = {}; testAction(loadBranch, { projectId, branchId }, store.state, [], [], done); }); - it('fetches branch data', done => { + it('fetches branch data', (done) => { const mockGetters = { findBranch: () => ({ commit: { id: ref } }) }; jest.spyOn(store, 'dispatch').mockResolvedValue(); @@ -317,7 +317,7 @@ describe('IDE store project actions', () => { .catch(done.fail); }); - it('shows an error if branch can not be fetched', done => { + it('shows an error if branch can not be fetched', (done) => { jest.spyOn(store, 'dispatch').mockReturnValue(Promise.reject()); loadBranch(store, { projectId, branchId }) @@ -356,7 +356,7 @@ describe('IDE store project actions', () => { jest.spyOn(store, 'dispatch').mockResolvedValue(); }); - it('dispatches branch actions', done => { + it('dispatches branch actions', (done) => { openBranch(store, branch) .then(() => { expect(store.dispatch.mock.calls).toEqual([ @@ -375,9 +375,9 @@ describe('IDE store project actions', () => { jest.spyOn(store, 'dispatch').mockReturnValue(Promise.reject()); }); - it('dispatches correct branch actions', done => { + it('dispatches correct branch actions', (done) => { openBranch(store, branch) - .then(val => { + .then((val) => { expect(store.dispatch.mock.calls).toEqual([ ['setCurrentBranchId', branchId], ['loadBranch', { projectId, branchId }], |