@@ -142,7 +142,7 @@ describe('compiler: transform v-on', () => {
142
142
key : { content : `onClick` } ,
143
143
value : {
144
144
type : NodeTypes . COMPOUND_EXPRESSION ,
145
- children : [ `( $event, ...args) => (` , { content : `i++` } , `)` ]
145
+ children : [ `$event => (` , { content : `i++` } , `)` ]
146
146
}
147
147
}
148
148
]
@@ -160,18 +160,14 @@ describe('compiler: transform v-on', () => {
160
160
// should wrap with `{` for multiple statements
161
161
// in this case the return value is discarded and the behavior is
162
162
// consistent with 2.x
163
- children : [
164
- `($event, ...args) => {` ,
165
- { content : `foo();bar()` } ,
166
- `}`
167
- ]
163
+ children : [ `$event => {` , { content : `foo();bar()` } , `}` ]
168
164
}
169
165
}
170
166
]
171
167
} )
172
168
} )
173
169
174
- test ( 'should handle multiple line statement' , ( ) => {
170
+ test ( 'should handle multi- line statement' , ( ) => {
175
171
const { node } = parseWithVOn ( `<div @click="\nfoo();\nbar()\n"/>` )
176
172
expect ( ( node . codegenNode as VNodeCall ) . props ) . toMatchObject ( {
177
173
properties : [
@@ -200,7 +196,7 @@ describe('compiler: transform v-on', () => {
200
196
value : {
201
197
type : NodeTypes . COMPOUND_EXPRESSION ,
202
198
children : [
203
- `( $event, ...args) => (` ,
199
+ `$event => (` ,
204
200
{
205
201
type : NodeTypes . COMPOUND_EXPRESSION ,
206
202
children : [
@@ -230,7 +226,7 @@ describe('compiler: transform v-on', () => {
230
226
value : {
231
227
type : NodeTypes . COMPOUND_EXPRESSION ,
232
228
children : [
233
- `( $event, ...args) => {` ,
229
+ `$event => {` ,
234
230
{
235
231
children : [
236
232
{ content : `_ctx.foo` } ,
@@ -452,7 +448,7 @@ describe('compiler: transform v-on', () => {
452
448
value : {
453
449
type : NodeTypes . COMPOUND_EXPRESSION ,
454
450
children : [
455
- `( $event, ...args) => (` ,
451
+ `$event => (` ,
456
452
{ children : [ { content : `_ctx.foo` } , `++` ] } ,
457
453
`)`
458
454
]
0 commit comments