diff --git a/components/Comment.spec.js b/components/Comment.spec.js index c10daca44..71076a696 100644 --- a/components/Comment.spec.js +++ b/components/Comment.spec.js @@ -1,4 +1,4 @@ -import { shallowMount, mount, createLocalVue } from '@vue/test-utils' +import { config, shallowMount, mount, createLocalVue } from '@vue/test-utils' import Comment from './Comment.vue' import Vue from 'vue' import Vuex from 'vuex' @@ -9,6 +9,7 @@ const localVue = createLocalVue() localVue.use(Vuex) localVue.use(Styleguide) +config.stubs['no-ssr'] = '' describe('Comment.vue', () => { let wrapper @@ -20,9 +21,12 @@ describe('Comment.vue', () => { beforeEach(() => { propsData = {} mocks = { - $t: jest.fn(), + $t: jest.fn() } getters = { + 'auth/user': () => { + return {} + }, 'auth/isModerator': () => false } }) @@ -38,7 +42,7 @@ describe('Comment.vue', () => { describe('given a comment', () => { beforeEach(() => { propsData.comment = { - content: 'Hello I am a comment content' + contentExcerpt: 'Hello I am a comment content' } }) diff --git a/components/Comment.vue b/components/Comment.vue index 4a8d81ded..42a8cf64f 100644 --- a/components/Comment.vue +++ b/components/Comment.vue @@ -1,33 +1,76 @@