diff --git a/test/plugins/utils.test.js b/test/plugins/utils.test.js index 79524f9e..323fd55f 100644 --- a/test/plugins/utils.test.js +++ b/test/plugins/utils.test.js @@ -203,6 +203,12 @@ test("loadPlugin", async (t) => { await loadPlugin({ cwd }, "./plugin-noop.cjs", { "./plugin-noop.cjs": "./test/fixtures" }), "From a shareable config context" ); + const { ...namedExports } = await import("../fixtures/plugin-esm-named-exports.js"); + const plugin = await loadPlugin({ cwd }, "./plugin-esm-named-exports.js", { + "./plugin-esm-named-exports.js": "./test/fixtures", + }); + + t.deepEqual(namedExports, plugin, "ESM with named exports"); t.is(func, await loadPlugin({ cwd }, func, {}), "Defined as a function"); });