mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-20 06:10:33 +03:00
implement fix for #9 edge-case
This commit is contained in:
@@ -19,21 +19,6 @@ describe('getComponentOption', () => {
|
||||
expect(fetchedOption).to.eql('foo')
|
||||
})
|
||||
|
||||
it('binds option method context to the component instance', () => {
|
||||
component = new Vue({
|
||||
data: {
|
||||
age: 44
|
||||
},
|
||||
foo: {
|
||||
bar () {
|
||||
return this.age
|
||||
}
|
||||
}
|
||||
})
|
||||
const fetchedOption = getComponentOption({ component, option: 'foo' })
|
||||
expect(fetchedOption.bar()).to.equal(44)
|
||||
})
|
||||
|
||||
it('fetches deeply nested component options and merges them', () => {
|
||||
Vue.component('merge-child', { template: '<div></div>', foo: { bar: 'baz' } })
|
||||
|
||||
|
||||
Reference in New Issue
Block a user