Skip to content

Commit

Permalink
add test case to close #1260
Browse files Browse the repository at this point in the history
  • Loading branch information
devTeaa committed Oct 8, 2020
1 parent f7b8341 commit 348cc1b
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions tests/lib/rules/custom-event-name-casing.js
Expand Up @@ -192,6 +192,40 @@ tester.run('custom-event-name-casing', rule, {
</script>
`,
options: [{ ignores: ['fooBar', 'barBaz', 'bazQux'] }]
},
{
filename: 'test.vue',
code: `
<template>
<input
@click="$emit('input:update')">
<input
@click="$emit('search:update')">
<input
@click="$emit('click:row')">
</template>
<script>
export default {
setup(props, context) {
return {
onInput(value) {
context.emit('input:update')
context.emit('search:update')
context.emit('click:row')
}
}
},
methods: {
onClick() {
this.$emit('input:update')
this.$emit('search:update')
this.$emit('click:row')
}
}
}
</script>
`,
options: [{ ignores: ['input:update', 'search:update', 'click:row'] }]
}
],
invalid: [
Expand Down

0 comments on commit 348cc1b

Please sign in to comment.