mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-23 14:10:33 +03:00
test: failing for duplicate VMID in same metaInfo
This commit is contained in:
@@ -75,6 +75,47 @@ describe('getMetaInfo', () => {
|
|||||||
__dangerouslyDisableSanitizersByTagID: {}
|
__dangerouslyDisableSanitizersByTagID: {}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
it('removes duplicate metaInfo in same component', () => {
|
||||||
|
component = new Vue({
|
||||||
|
metaInfo: {
|
||||||
|
title: 'Hello',
|
||||||
|
meta: [
|
||||||
|
{
|
||||||
|
vmid: 'a',
|
||||||
|
property: 'a',
|
||||||
|
content: 'a'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
vmid: 'a',
|
||||||
|
property: 'a',
|
||||||
|
content: 'b'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
expect(getMetaInfo(component)).to.eql({
|
||||||
|
title: 'Hello',
|
||||||
|
titleChunk: 'Hello',
|
||||||
|
titleTemplate: '%s',
|
||||||
|
htmlAttrs: {},
|
||||||
|
headAttrs: {},
|
||||||
|
bodyAttrs: {},
|
||||||
|
meta: [
|
||||||
|
{
|
||||||
|
vmid: 'a',
|
||||||
|
property: 'a',
|
||||||
|
content: 'b'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
base: [],
|
||||||
|
link: [],
|
||||||
|
style: [],
|
||||||
|
script: [],
|
||||||
|
noscript: [],
|
||||||
|
__dangerouslyDisableSanitizers: [],
|
||||||
|
__dangerouslyDisableSanitizersByTagID: {}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
it('properly uses string titleTemplates', () => {
|
it('properly uses string titleTemplates', () => {
|
||||||
component = new Vue({
|
component = new Vue({
|
||||||
|
|||||||
Reference in New Issue
Block a user