From ecd8b8dd6c0f11d2f28e9f6e1efe92d5d1d5073c Mon Sep 17 00:00:00 2001 From: Jamund Ferguson Date: Tue, 4 Aug 2015 09:18:49 -0700 Subject: [PATCH] Tests: obj/rest spread and computed-property rule (fixes #3) --- tests/computed-property-even-spacing.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/computed-property-even-spacing.js b/tests/computed-property-even-spacing.js index 3a84b55..376e24d 100644 --- a/tests/computed-property-even-spacing.js +++ b/tests/computed-property-even-spacing.js @@ -79,7 +79,13 @@ ruleTester.run('computed-property-even-spacing', rule, { // never - unrelated cases { code: 'var foo = {};', options: ['never'] }, - { code: 'var foo = [];', options: ['never'] } + { code: 'var foo = [];', options: ['never'] }, + { code: 'bar[ foo ]', options: ['even'] }, + + // even - unrelated cases + { code: 'const { a, ...b } = obj', options: ['even'], ecmaFeatures: { blockBindings: true, destructuring: true, experimentalObjectRestSpread: true } }, + { code: 'func(a, { ...b })', options: ['even'], ecmaFeatures: { destructuring: true, experimentalObjectRestSpread: true } } + ], invalid: [