Skip to content

Commit a24ebdd

Browse files
committed
fixing test warnings
1 parent 4b8b7ac commit a24ebdd

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

jest.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ module.exports = {
1111
"!src/documentation/process_doc.js",
1212
"!src/store/index.js",
1313
"!src/plugins/**",
14-
"!src/router/routes.js"
14+
"!src/router/routes.js",
15+
"!views/Records/NetworkGraph.vue"
1516
],
1617
testMatch: [
1718
"**/**.spec.js", "**/**/**.spec.js", "tests/**/**.spec.js", "tests/**/**/**.spec.js"

tests/unit/views/CreateRecord/Editor.spec.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ describe("Editor.vue", function() {
4747
it("can be instantiated", async () => {
4848
wrapper = await shallowMount(CreateRecord, {
4949
localVue,
50-
mocks: {$store, $route},
50+
router,
51+
mocks: {$store, $route, $router},
5152
stubs: ['router-link']
5253
});
5354
expect(wrapper.vm.$options.name).toMatch("Editor");
@@ -65,7 +66,8 @@ describe("Editor.vue", function() {
6566
it("can clean the store on destroy", async () => {
6667
wrapper = await shallowMount(CreateRecord, {
6768
localVue,
68-
mocks: {$store, $route},
69+
router,
70+
mocks: {$store, $route, $router},
6971
stubs: ['router-link']
7072
});
7173
wrapper.vm.hasLoaded = false;
@@ -81,7 +83,7 @@ describe("Editor.vue", function() {
8183
restStub.withArgs(sinon.match.any).returns({data: {error: "error"}});
8284
wrapper = await shallowMount(CreateRecord, {
8385
localVue,
84-
mocks: {$store, $route},
86+
mocks: {$store, $route, $router},
8587
stubs: ['router-link']
8688
});
8789
$store.state.users.user = function(){return {credentials: {token: "123"}}};
@@ -92,7 +94,8 @@ describe("Editor.vue", function() {
9294
it("reloads data correctly", async () => {
9395
wrapper = await shallowMount(CreateRecord, {
9496
localVue,
95-
mocks: {$store, $route},
97+
router,
98+
mocks: {$store, $route, $router},
9699
stubs: ['router-link']
97100
});
98101
wrapper.vm.confirmPanels[0].show = true;

0 commit comments

Comments
 (0)