diff --git a/webapp/pages/post/_id/_slug/index.spec.js b/webapp/pages/post/_id/_slug/index.spec.js index bc54edf53..4289bb53d 100644 --- a/webapp/pages/post/_id/_slug/index.spec.js +++ b/webapp/pages/post/_id/_slug/index.spec.js @@ -4,6 +4,7 @@ import Vue from 'vue' import PostSlug from './index.vue' import CommentList from '~/components/CommentList/CommentList' import HcHashtag from '~/components/Hashtag/Hashtag' +import VueMeta from 'vue-meta' config.stubs['client-only'] = '' config.stubs['nuxt-link'] = '' @@ -11,6 +12,7 @@ config.stubs['router-link'] = '' const localVue = global.localVue localVue.directive('scrollTo', jest.fn()) +localVue.use(VueMeta, { keyName: 'head' }) describe('PostSlug', () => { let wrapper, Wrapper, backendData, mocks, stubs @@ -91,6 +93,11 @@ describe('PostSlug', () => { return wrapper } + it('has correct content', async () => { + wrapper = await Wrapper() + expect(wrapper.vm.$metaInfo.title).toBe('loading') + }) + describe('given author is `null`', () => { it('does not crash', async () => { backendData = {