Skip to content

Commit

Permalink
Add test for 14233
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Feb 4, 2022
1 parent 89e26a0 commit 8f546c1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packages/babel-core/test/external-dependencies.js
Expand Up @@ -230,4 +230,24 @@ describe("externalDependencies", () => {
).not.toThrow();
});
});

describe("regressions", () => {
it("#14233", () => {
const code = `let a = 1`;

function pluginA(api) {
api.cache.never();
return { name: "plugin-a" };
}
function pluginB() {
return { name: "plugin-b", inherits: pluginA };
}

expect(() => {
transform(code, { plugins: [pluginB] });

transform(code, { plugins: [pluginB] });
}).not.toThrow();
});
});
});

0 comments on commit 8f546c1

Please sign in to comment.