From 2090e3939b6a08844697d958decc565d1b429962 Mon Sep 17 00:00:00 2001 From: Alina Beck Date: Tue, 15 Oct 2019 16:07:09 +0300 Subject: [PATCH] add $route mock to Comment and CommentList spec --- webapp/components/Comment/Comment.spec.js | 3 +++ webapp/components/CommentList/CommentList.spec.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/webapp/components/Comment/Comment.spec.js b/webapp/components/Comment/Comment.spec.js index 59e3f6c5a..31ce8a40e 100644 --- a/webapp/components/Comment/Comment.spec.js +++ b/webapp/components/Comment/Comment.spec.js @@ -32,6 +32,9 @@ describe('Comment.vue', () => { truncate: a => a, removeHtml: a => a, }, + $route: { + hash: '', + }, $scrollTo: jest.fn(), $apollo: { mutate: jest.fn().mockResolvedValue({ diff --git a/webapp/components/CommentList/CommentList.spec.js b/webapp/components/CommentList/CommentList.spec.js index 3287b7cd4..16b284134 100644 --- a/webapp/components/CommentList/CommentList.spec.js +++ b/webapp/components/CommentList/CommentList.spec.js @@ -42,6 +42,9 @@ describe('CommentList.vue', () => { truncate: a => a, removeHtml: a => a, }, + $route: { + hash: '', + }, $scrollTo: jest.fn(), $apollo: { queries: {