@@ -165,8 +165,9 @@ describe('compiler: transform v-bind', () => {
165
165
} )
166
166
} )
167
167
168
- test . fails ( '.camel modifier' , ( ) => {
168
+ test ( '.camel modifier' , ( ) => {
169
169
const node = parseWithVBind ( `<div v-bind:foo-bar.camel="id"/>` )
170
+ console . log ( 'node.effect[0].operations[0]' , node . effect [ 0 ] . operations [ 0 ] )
170
171
expect ( node . effect [ 0 ] . operations [ 0 ] ) . toMatchObject ( {
171
172
key : {
172
173
content : `fooBar` ,
@@ -179,7 +180,7 @@ describe('compiler: transform v-bind', () => {
179
180
} )
180
181
} )
181
182
182
- test . fails ( '.camel modifier w/ no expression' , ( ) => {
183
+ test ( '.camel modifier w/ no expression' , ( ) => {
183
184
const node = parseWithVBind ( `<div v-bind:foo-bar.camel />` )
184
185
expect ( node . effect [ 0 ] . operations [ 0 ] ) . toMatchObject ( {
185
186
key : {
@@ -193,13 +194,13 @@ describe('compiler: transform v-bind', () => {
193
194
} )
194
195
} )
195
196
196
- test . fails ( '.camel modifier w/ dynamic arg' , ( ) => {
197
+ test ( '.camel modifier w/ dynamic arg' , ( ) => {
197
198
const node = parseWithVBind ( `<div v-bind:[foo].camel="id"/>` )
198
199
expect ( node . effect [ 0 ] . operations [ 0 ] ) . toMatchObject ( {
200
+ runtimeCamelize : true ,
199
201
key : {
200
202
content : `foo` ,
201
203
isStatic : false ,
202
- somethingShouldBeTrue : true ,
203
204
} ,
204
205
value : {
205
206
content : `id` ,
@@ -289,8 +290,7 @@ describe('compiler: codegen v-bind', () => {
289
290
expect ( code ) . contains ( '_setAttr(n1, _ctx.id, undefined, _ctx.id)' )
290
291
} )
291
292
292
- // TODO: camel modifier for v-bind
293
- test . fails ( '.camel modifier' , ( ) => {
293
+ test ( '.camel modifier' , ( ) => {
294
294
const code = compile ( `<div v-bind:foo-bar.camel="id"/>` )
295
295
296
296
expect ( code ) . matchSnapshot ( )
0 commit comments