Skip to content

Commit

Permalink
fixing test warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
prakhyatox committed Oct 11, 2023
1 parent 4b8b7ac commit a24ebdd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ module.exports = {
"!src/documentation/process_doc.js",
"!src/store/index.js",
"!src/plugins/**",
"!src/router/routes.js"
"!src/router/routes.js",
"!views/Records/NetworkGraph.vue"
],
testMatch: [
"**/**.spec.js", "**/**/**.spec.js", "tests/**/**.spec.js", "tests/**/**/**.spec.js"
Expand Down
11 changes: 7 additions & 4 deletions tests/unit/views/CreateRecord/Editor.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ describe("Editor.vue", function() {
it("can be instantiated", async () => {
wrapper = await shallowMount(CreateRecord, {
localVue,
mocks: {$store, $route},
router,
mocks: {$store, $route, $router},
stubs: ['router-link']
});
expect(wrapper.vm.$options.name).toMatch("Editor");
Expand All @@ -65,7 +66,8 @@ describe("Editor.vue", function() {
it("can clean the store on destroy", async () => {
wrapper = await shallowMount(CreateRecord, {
localVue,
mocks: {$store, $route},
router,
mocks: {$store, $route, $router},
stubs: ['router-link']
});
wrapper.vm.hasLoaded = false;
Expand All @@ -81,7 +83,7 @@ describe("Editor.vue", function() {
restStub.withArgs(sinon.match.any).returns({data: {error: "error"}});
wrapper = await shallowMount(CreateRecord, {
localVue,
mocks: {$store, $route},
mocks: {$store, $route, $router},
stubs: ['router-link']
});
$store.state.users.user = function(){return {credentials: {token: "123"}}};
Expand All @@ -92,7 +94,8 @@ describe("Editor.vue", function() {
it("reloads data correctly", async () => {
wrapper = await shallowMount(CreateRecord, {
localVue,
mocks: {$store, $route},
router,
mocks: {$store, $route, $router},
stubs: ['router-link']
});
wrapper.vm.confirmPanels[0].show = true;
Expand Down

0 comments on commit a24ebdd

Please sign in to comment.