|
|
@@ -123,7 +123,7 @@ describe('Util - Option merging', function () {
|
|
|
}
|
|
|
})
|
|
|
expect(typeof res.components.test).toBe('function')
|
|
|
- expect(res.components.test.options.id).toBe('test')
|
|
|
+ expect(res.components.test.options.name).toBe('test')
|
|
|
expect(res.components.test.super).toBe(Vue)
|
|
|
})
|
|
|
|
|
|
@@ -282,11 +282,12 @@ describe('Util - Option merging', function () {
|
|
|
}
|
|
|
}
|
|
|
var b = {
|
|
|
- components: [{ id: 'b' }]
|
|
|
+ components: [{ name: 'b' }]
|
|
|
}
|
|
|
var res = merge(a, b)
|
|
|
expect(res.components.a).toBe(a.components.a)
|
|
|
// b.components is guarded and converted to object hash
|
|
|
+ expect(res.components.b).toBeTruthy()
|
|
|
expect(res.components.b).toBe(b.components.b)
|
|
|
})
|
|
|
|
|
|
@@ -300,7 +301,7 @@ describe('Util - Option merging', function () {
|
|
|
components: [{}]
|
|
|
}
|
|
|
merge(a, b)
|
|
|
- expect(hasWarned(_, 'must provide an id')).toBe(true)
|
|
|
+ expect(hasWarned(_, 'must provide a "name" field')).toBe(true)
|
|
|
})
|
|
|
|
|
|
})
|