2
0
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:
Declan de Wet
2016-11-08 03:55:55 +02:00
parent ebb101d8e7
commit 6ad56ec73e
7 changed files with 38 additions and 45 deletions
-15
View File
@@ -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' } })