2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-06-08 22:02:25 +03:00

test: failing for duplicate VMID in same metaInfo

This commit is contained in:
Alexander Lichter
2018-11-06 16:55:14 +00:00
parent e95381fda2
commit 3eac2b9fe2
+41
View File
@@ -75,6 +75,47 @@ describe('getMetaInfo', () => {
__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', () => {
component = new Vue({