mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-24 21:20:34 +03:00
test: fix title tests
This commit is contained in:
@@ -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 }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user