mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-16 15:20:34 +03:00
fix: set ssr appId in mounted hook
vm. is not yet set in beforeMount
This commit is contained in:
@@ -102,12 +102,15 @@ describe('client', () => {
|
||||
|
||||
test('doesnt update when ssr attribute is set', () => {
|
||||
html.setAttribute(defaultOptions.ssrAttribute, 'true')
|
||||
const wrapper = mount(HelloWorld, { localVue: Vue })
|
||||
const wrapper = mount(HelloWorld, {
|
||||
localVue: Vue,
|
||||
attrs: {
|
||||
'data-server-rendered': true
|
||||
}
|
||||
})
|
||||
|
||||
const { tags } = wrapper.vm.$meta().refresh()
|
||||
// TODO: fix this test, not sure how to create a wrapper with a attri
|
||||
// bute data-server-rendered="true"
|
||||
expect(tags).not.toBe(false)
|
||||
expect(tags).toBe(false)
|
||||
})
|
||||
|
||||
test('changed function is called', async () => {
|
||||
@@ -229,7 +232,12 @@ describe('client', () => {
|
||||
}
|
||||
})
|
||||
|
||||
const wrapper = mount(component, { localVue: Vue })
|
||||
const wrapper = mount(component, {
|
||||
localVue: Vue,
|
||||
attrs: {
|
||||
'data-server-rendered': true
|
||||
}
|
||||
})
|
||||
expect(html.getAttribute('theme')).not.toBe('dark')
|
||||
|
||||
await vmTick(wrapper.vm)
|
||||
|
||||
Reference in New Issue
Block a user