diff --git a/app/assets/javascripts/diffs/store/actions.js b/app/assets/javascripts/diffs/store/actions.js
index 5e0fd5109bbf8e7b89ca90d2512b56333cd4f001..5bfe42618c28b4a755ec797cdc028a7fc84fb9f8 100644
--- a/app/assets/javascripts/diffs/store/actions.js
+++ b/app/assets/javascripts/diffs/store/actions.js
@@ -82,14 +82,5 @@ export const expandAllFiles = ({ commit }) => {
   commit(types.EXPAND_ALL_FILES);
 };
 
-export default {
-  setBaseConfig,
-  fetchDiffFiles,
-  setInlineDiffViewType,
-  setParallelDiffViewType,
-  showCommentForm,
-  cancelCommentForm,
-  loadMoreLines,
-  loadCollapsedDiff,
-  expandAllFiles,
-};
+// prevent babel-plugin-rewire from generating an invalid default during karma tests
+export default () => {};
diff --git a/app/assets/javascripts/diffs/store/index.js b/app/assets/javascripts/diffs/store/index.js
deleted file mode 100644
index e6aa8f5b12a51d7910ca71938c4d0d923986f094..0000000000000000000000000000000000000000
--- a/app/assets/javascripts/diffs/store/index.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import diffsModule from './modules';
-
-Vue.use(Vuex);
-
-export default new Vuex.Store({
-  modules: {
-    diffs: diffsModule,
-  },
-});
diff --git a/app/assets/javascripts/diffs/store/modules/index.js b/app/assets/javascripts/diffs/store/modules/index.js
index c745320d532551fe6c27c068730c820f99743ba2..56c26d1ffad9cea0a5b9c95dae109dc3079c355b 100644
--- a/app/assets/javascripts/diffs/store/modules/index.js
+++ b/app/assets/javascripts/diffs/store/modules/index.js
@@ -1,4 +1,4 @@
-import actions from '../actions';
+import * as actions from '../actions';
 import * as getters from '../getters';
 import mutations from '../mutations';
 import createState from './diff_state';
diff --git a/changelogs/unreleased/48951-clean-up.yml b/changelogs/unreleased/48951-clean-up.yml
new file mode 100644
index 0000000000000000000000000000000000000000..0102cd43f96f99731c09e8c6d5ca91045a5148cd
--- /dev/null
+++ b/changelogs/unreleased/48951-clean-up.yml
@@ -0,0 +1,5 @@
+---
+title: Removes unused vuex code in mr refactor and removes unneeded dependencies
+merge_request: 20499
+author:
+type: other
diff --git a/spec/javascripts/diffs/components/changed_files_spec.js b/spec/javascripts/diffs/components/changed_files_spec.js
index 2d57af6137c666859e47d2de1e6267d240b78523..f737e8fa38ec9ed373bb35b1cdaf86566c18bcad 100644
--- a/spec/javascripts/diffs/components/changed_files_spec.js
+++ b/spec/javascripts/diffs/components/changed_files_spec.js
@@ -1,12 +1,17 @@
 import Vue from 'vue';
-import $ from 'jquery';
+import Vuex from 'vuex';
 import { mountComponentWithStore } from 'spec/helpers';
-import store from '~/diffs/store';
-import ChangedFiles from '~/diffs/components/changed_files.vue';
+import diffsModule from '~/diffs/store/modules';
+import changedFiles from '~/diffs/components/changed_files.vue';
 
 describe('ChangedFiles', () => {
-  const Component = Vue.extend(ChangedFiles);
-  const createComponent = props => mountComponentWithStore(Component, { props, store });
+  const Component = Vue.extend(changedFiles);
+  const store = new Vuex.Store({
+    modules: {
+      diffs: diffsModule,
+    },
+  });
+
   let vm;
 
   beforeEach(() => {
@@ -14,6 +19,7 @@ describe('ChangedFiles', () => {
       <div id="dummy-element"></div>
       <div class="js-tabs-affix"></div>
     `);
+
     const props = {
       diffFiles: [
         {
@@ -26,7 +32,8 @@ describe('ChangedFiles', () => {
         },
       ],
     };
-    vm = createComponent(props);
+
+    vm = mountComponentWithStore(Component, { props, store });
   });
 
   describe('with single file added', () => {
@@ -40,58 +47,56 @@ describe('ChangedFiles', () => {
     });
   });
 
-  describe('template', () => {
-    describe('diff view mode buttons', () => {
-      let inlineButton;
-      let parallelButton;
+  describe('diff view mode buttons', () => {
+    let inlineButton;
+    let parallelButton;
 
-      beforeEach(() => {
-        inlineButton = vm.$el.querySelector('.js-inline-diff-button');
-        parallelButton = vm.$el.querySelector('.js-parallel-diff-button');
-      });
+    beforeEach(() => {
+      inlineButton = vm.$el.querySelector('.js-inline-diff-button');
+      parallelButton = vm.$el.querySelector('.js-parallel-diff-button');
+    });
+
+    it('should have Inline and Side-by-side buttons', () => {
+      expect(inlineButton).toBeDefined();
+      expect(parallelButton).toBeDefined();
+    });
+
+    it('should add active class to Inline button', done => {
+      vm.$store.state.diffs.diffViewType = 'inline';
+
+      vm.$nextTick(() => {
+        expect(inlineButton.classList.contains('active')).toEqual(true);
+        expect(parallelButton.classList.contains('active')).toEqual(false);
 
-      it('should have Inline and Side-by-side buttons', () => {
-        expect(inlineButton).toBeDefined();
-        expect(parallelButton).toBeDefined();
+        done();
       });
+    });
 
-      it('should add active class to Inline button', done => {
-        vm.$store.state.diffs.diffViewType = 'inline';
+    it('should toggle active state of buttons when diff view type changed', done => {
+      vm.$store.state.diffs.diffViewType = 'parallel';
 
-        vm.$nextTick(() => {
-          expect(inlineButton.classList.contains('active')).toEqual(true);
-          expect(parallelButton.classList.contains('active')).toEqual(false);
+      vm.$nextTick(() => {
+        expect(inlineButton.classList.contains('active')).toEqual(false);
+        expect(parallelButton.classList.contains('active')).toEqual(true);
 
-          done();
-        });
+        done();
       });
+    });
 
-      it('should toggle active state of buttons when diff view type changed', done => {
-        vm.$store.state.diffs.diffViewType = 'parallel';
+    describe('clicking them', () => {
+      it('should toggle the diff view type', done => {
+        parallelButton.click();
 
         vm.$nextTick(() => {
           expect(inlineButton.classList.contains('active')).toEqual(false);
           expect(parallelButton.classList.contains('active')).toEqual(true);
 
-          done();
-        });
-      });
-
-      describe('clicking them', () => {
-        it('should toggle the diff view type', done => {
-          $(parallelButton).click();
+          inlineButton.click();
 
           vm.$nextTick(() => {
-            expect(inlineButton.classList.contains('active')).toEqual(false);
-            expect(parallelButton.classList.contains('active')).toEqual(true);
-
-            $(inlineButton).click();
-
-            vm.$nextTick(() => {
-              expect(inlineButton.classList.contains('active')).toEqual(true);
-              expect(parallelButton.classList.contains('active')).toEqual(false);
-              done();
-            });
+            expect(inlineButton.classList.contains('active')).toEqual(true);
+            expect(parallelButton.classList.contains('active')).toEqual(false);
+            done();
           });
         });
       });