mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-05-17 04:39:38 +03:00
test: fix title tests
This commit is contained in:
@@ -6,7 +6,7 @@ import * as render from '../../src/render'
|
||||
|
||||
describe('render', () => {
|
||||
test('render key-string element (without value attribute)', () => {
|
||||
const context: MetaRenderContext = { metainfo: {} }
|
||||
const context: MetaRenderContext = { isSSR: true, metainfo: {} }
|
||||
const key = 'TitleTest'
|
||||
const data = 'my title'
|
||||
const config = {
|
||||
@@ -384,6 +384,7 @@ describe('render', () => {
|
||||
|
||||
const slot = jest.fn().mockReturnValue([{ children: 'slot title' }])
|
||||
const context = {
|
||||
isSSR: true,
|
||||
metainfo: { [key]: data },
|
||||
slots: { title: slot }
|
||||
}
|
||||
@@ -453,6 +454,7 @@ describe('render', () => {
|
||||
|
||||
const slot = jest.fn().mockReturnValue(undefined) // slot returns nothing
|
||||
const context = {
|
||||
isSSR: true,
|
||||
metainfo: { [key]: data },
|
||||
slots: { title: slot }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user