From 44038a46ab72187518f6d252894787e89b249771 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Mon, 26 Apr 2021 00:34:17 +0200 Subject: [PATCH] test head post/_id/_slug/index.spec.js --- webapp/pages/post/_id/_slug/index.spec.js | 7 +++++++ 1 file changed, 7 insertions(+) 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 = {