Skip to content

Commit 4331491

Browse files
authored
Add test for no-side-effects-in-computed-properties rule to check #1282 (#1283)
1 parent 48d82c0 commit 4331491

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/lib/rules/no-side-effects-in-computed-properties.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,16 @@ ruleTester.run('no-side-effects-in-computed-properties', rule, {
180180
el: test.el
181181
})`,
182182
parserOptions
183+
},
184+
{
185+
code: `Vue.component('test', {
186+
computed: {
187+
test () {
188+
return [...this.items].reverse()
189+
},
190+
}
191+
})`,
192+
parserOptions
183193
}
184194
],
185195
invalid: [

0 commit comments

Comments
 (0)