Skip to content

Commit 67a31b1

Browse files
committed
[Tests] no-unused-modules: add export + destructuring case
Closes #1683.
1 parent 381267a commit 67a31b1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/src/rules/no-unused-modules.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ ruleTester.run('no-unused-modules', rule, {
5252
code: 'const a = 1; export default a'}),
5353
test({ options: missingExportsOptions,
5454
code: 'export class Foo {}'}),
55+
test({ options: missingExportsOptions,
56+
code: 'export const [foobar] = [];'}),
57+
test({ options: missingExportsOptions,
58+
code: 'export const [foobar] = foobarFactory();'}),
5559
],
5660
invalid: [
5761
test({

0 commit comments

Comments
 (0)