From 64423e98dee4ea7185e16796a981ec53537f2913 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Sat, 18 Sep 2021 17:01:24 -0700 Subject: [PATCH] [Tests] add passing test for export-star Closes #2093 --- tests/files/export-star-4/module/feature.jsx | 3 +++ tests/files/export-star-4/module/index.ts | 1 + tests/src/rules/export.js | 12 ++++++++++++ 3 files changed, 16 insertions(+) create mode 100644 tests/files/export-star-4/module/feature.jsx create mode 100644 tests/files/export-star-4/module/index.ts diff --git a/tests/files/export-star-4/module/feature.jsx b/tests/files/export-star-4/module/feature.jsx new file mode 100644 index 000000000..82fab1e50 --- /dev/null +++ b/tests/files/export-star-4/module/feature.jsx @@ -0,0 +1,3 @@ +export function func() { + console.log('Hello world'); +} diff --git a/tests/files/export-star-4/module/index.ts b/tests/files/export-star-4/module/index.ts new file mode 100644 index 000000000..42a9f556a --- /dev/null +++ b/tests/files/export-star-4/module/index.ts @@ -0,0 +1 @@ +export * from './feature'; diff --git a/tests/src/rules/export.js b/tests/src/rules/export.js index efc6e402f..c4e3e8e60 100644 --- a/tests/src/rules/export.js +++ b/tests/src/rules/export.js @@ -245,6 +245,18 @@ context('TypeScript', function () { export {Bar as default}; `, }, parserConfig)), + + test({ + ...parserConfig, + code: ` + export * from './module'; + `, + filename: testFilePath('export-star-4/index.js'), + settings: { + ...parserConfig.settings, + 'import/extensions': ['.js', '.ts', '.jsx'], + }, + }), ], invalid: [ // type/value name clash