2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-06-17 19:40:32 +03:00

chore: lint & fix test

This commit is contained in:
pimlie
2019-09-12 15:43:09 +02:00
parent c344d60d5f
commit ae98f65511
3 changed files with 12 additions and 10 deletions
+8 -2
View File
@@ -20,13 +20,19 @@ describe('getComponentOption', () => {
expect(mergedOption.foo).toEqual('bar')
})
test('calls a function option, injecting the component as context', () => {
test('calls a function as computed prop, injecting the component as context', () => {
const component = new Vue({
name: 'Foobar',
someFunc () {
return { opt: this.$options.name }
return { opt: this.name }
},
computed: {
$metaInfo () {
return this.$options.someFunc()
}
}
})
const mergedOption = getComponentOption({ keyName: 'someFunc' }, component)
// TODO: Should this be foobar or Foobar
expect(mergedOption.opt).toBeDefined()