From 1b3597607aefb7cc76616598263927734ba6dac9 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 8 Sep 2022 17:07:35 +0300 Subject: [PATCH] test: @putout/plugin-declare-imports-first: ExportNamespaceSpecifier (benjamn/recast#1185) --- .../test/declare-imports-first.js | 5 +++++ .../test/fixture/export-star-fix.js | 2 ++ .../plugin-declare-imports-first/test/fixture/export-star.js | 2 ++ 3 files changed, 9 insertions(+) create mode 100644 packages/plugin-declare-imports-first/test/fixture/export-star-fix.js create mode 100644 packages/plugin-declare-imports-first/test/fixture/export-star.js diff --git a/packages/plugin-declare-imports-first/test/declare-imports-first.js b/packages/plugin-declare-imports-first/test/declare-imports-first.js index 6343cc5a98..b2056b138b 100644 --- a/packages/plugin-declare-imports-first/test/declare-imports-first.js +++ b/packages/plugin-declare-imports-first/test/declare-imports-first.js @@ -31,6 +31,11 @@ test('plugin-declaration-imports-first: no report: no-vars', (t) => { t.end(); }); +test('plugin-declaration-imports-first: no report: export-star', (t) => { + t.transform('export-star'); + t.end(); +}); + test('plugin-declaration-imports-first: transform: remove', (t) => { t.transform('remove', { remove: { diff --git a/packages/plugin-declare-imports-first/test/fixture/export-star-fix.js b/packages/plugin-declare-imports-first/test/fixture/export-star-fix.js new file mode 100644 index 0000000000..989f7e4415 --- /dev/null +++ b/packages/plugin-declare-imports-first/test/fixture/export-star-fix.js @@ -0,0 +1,2 @@ +export * as fs2 from 'fs/promises'; +const {writeFile} = await import('fs/promses'); diff --git a/packages/plugin-declare-imports-first/test/fixture/export-star.js b/packages/plugin-declare-imports-first/test/fixture/export-star.js new file mode 100644 index 0000000000..4f03fbbf99 --- /dev/null +++ b/packages/plugin-declare-imports-first/test/fixture/export-star.js @@ -0,0 +1,2 @@ +const {writeFile} = await import('fs/promses'); +export * as fs2 from 'fs/promises';