Skip to content

Commit 23248d5

Browse files
committed
add test case for issue #1260
1 parent f7b8341 commit 23248d5

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

tests/lib/rules/custom-event-name-casing.js

+34
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,40 @@ tester.run('custom-event-name-casing', rule, {
192192
</script>
193193
`,
194194
options: [{ ignores: ['fooBar', 'barBaz', 'bazQux'] }]
195+
},
196+
{
197+
filename: 'test.vue',
198+
code: `
199+
<template>
200+
<input
201+
@click="$emit('input:update')">
202+
<input
203+
@click="$emit('search:update')">
204+
<input
205+
@click="$emit('click:row')">
206+
</template>
207+
<script>
208+
export default {
209+
setup(props, context) {
210+
return {
211+
onInput(value) {
212+
context.emit('input:update')
213+
context.emit('search:update')
214+
context.emit('click:row')
215+
}
216+
}
217+
},
218+
methods: {
219+
onClick() {
220+
this.$emit('input:update')
221+
this.$emit('search:update')
222+
this.$emit('click:row')
223+
}
224+
}
225+
}
226+
</script>
227+
`,
228+
options: [{ ignores: ['input:update', 'search:update', 'click:row'] }]
195229
}
196230
],
197231
invalid: [

0 commit comments

Comments
 (0)