2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-06-24 23:10:33 +03:00

test: fix title tests

This commit is contained in:
pimlie
2021-05-24 00:35:19 +02:00
parent 1785d4fef6
commit c492437750
+3 -1
View File
@@ -6,7 +6,7 @@ import * as render from '../../src/render'
describe('render', () => { describe('render', () => {
test('render key-string element (without value attribute)', () => { test('render key-string element (without value attribute)', () => {
const context: MetaRenderContext = { metainfo: {} } const context: MetaRenderContext = { isSSR: true, metainfo: {} }
const key = 'TitleTest' const key = 'TitleTest'
const data = 'my title' const data = 'my title'
const config = { const config = {
@@ -384,6 +384,7 @@ describe('render', () => {
const slot = jest.fn().mockReturnValue([{ children: 'slot title' }]) const slot = jest.fn().mockReturnValue([{ children: 'slot title' }])
const context = { const context = {
isSSR: true,
metainfo: { [key]: data }, metainfo: { [key]: data },
slots: { title: slot } slots: { title: slot }
} }
@@ -453,6 +454,7 @@ describe('render', () => {
const slot = jest.fn().mockReturnValue(undefined) // slot returns nothing const slot = jest.fn().mockReturnValue(undefined) // slot returns nothing
const context = { const context = {
isSSR: true,
metainfo: { [key]: data }, metainfo: { [key]: data },
slots: { title: slot } slots: { title: slot }
} }