Skip to content

Commit

Permalink
add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jun 19, 2023
1 parent d9f6a15 commit 07deef7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/utils.test.ts
Expand Up @@ -124,6 +124,16 @@ describe("lookupNodeModuleSubpath", () => {
input: r("/foo/bar/lib/subpath.mjs"),
output: undefined,
},
{
name: "resolves main export",
input: r("fixture/package/node_modules/subpaths/foo/bar.mjs"),
output: "./foo/bar.mjs",
},
{
name: "resolves main export",
input: r("fixture/package/node_modules/subpaths/"),
output: "./",
},
];

for (const t of tests) {
Expand Down

0 comments on commit 07deef7

Please sign in to comment.