|
|
@@ -9,7 +9,8 @@ describe('v-bind', function () {
|
|
|
el = document.createElement('div')
|
|
|
dir = {
|
|
|
el: el,
|
|
|
- descriptor: {}
|
|
|
+ descriptor: {},
|
|
|
+ modifiers: {}
|
|
|
}
|
|
|
_.extend(dir, def)
|
|
|
})
|
|
|
@@ -70,4 +71,14 @@ describe('v-bind', function () {
|
|
|
dir.update(null)
|
|
|
expect(dir.el.hasAttributeNS(xlinkNS, 'special')).toBe(false)
|
|
|
})
|
|
|
+
|
|
|
+ it('camel modifier', function () {
|
|
|
+ dir.modifiers.camel = true
|
|
|
+ var div = document.createElement('div')
|
|
|
+ div.innerHTML = '<svg></svg>'
|
|
|
+ dir.el = div.children[0]
|
|
|
+ dir.arg = 'view-box'
|
|
|
+ dir.update('0 0 1500 1000')
|
|
|
+ expect(dir.el.getAttribute('viewBox')).toBe('0 0 1500 1000')
|
|
|
+ })
|
|
|
})
|