Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Oct 9, 2024
1 parent d761322 commit 84a80bf
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/babel-core/test/resolution.js
Original file line number Diff line number Diff line change
Expand Up @@ -506,4 +506,20 @@ describe("addon resolution", function () {
).code,
).toBe(`"ESM"`);
});

it("resolvePreset", function () {
expect(
babel.resolvePreset("@babel/foo", path.join(base, "babel-org-paths")),
).toMatch(
/babel-org-paths[\\/]node_modules[\\/]@babel[\\/]preset-foo[\\/]index.js/,
);
});

it("resolvePlugin", function () {
expect(
babel.resolvePlugin("@babel/foo", path.join(base, "babel-org-paths")),
).toMatch(
/babel-org-paths[\\/]node_modules[\\/]@babel[\\/]plugin-foo[\\/]index.js/,
);
});
});

0 comments on commit 84a80bf

Please sign in to comment.