Skip to content

Commit

Permalink
test(npm): test wildcard exports resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
wontem committed Jan 13, 2023
1 parent b46a8c7 commit 7920aad
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cli/tests/testdata/npm/conditional_exports/main.js
@@ -1,10 +1,12 @@
import mod from "npm:@denotest/conditional-exports";
import foo from "npm:@denotest/conditional-exports/foo.js";
import client from "npm:@denotest/conditional-exports/client";
import clientFoo from "npm:@denotest/conditional-exports/client/foo";
import clientBar from "npm:@denotest/conditional-exports/client/bar";
import supportsESM from "npm:supports-esm";

console.log(mod);
console.log(foo);
console.log(client);
console.log(clientFoo);
console.log(clientBar);
Expand Down
1 change: 1 addition & 0 deletions cli/tests/testdata/npm/conditional_exports/main.out
Expand Up @@ -7,6 +7,7 @@ Download http://localhost:4545/npm/registry/@ljharb/has-package-exports-patterns
Download http://localhost:4545/npm/registry/has-package-exports/has-package-exports-1.3.0.tgz
Download http://localhost:4545/npm/registry/supports-esm/supports-esm-1.0.0.tgz
{ hello: "from esm" }
{ hello: "from foo" }
{ hello: "from esm client" }
{ hello: "from esm client foo" }
{ hello: "from esm client bar" }
Expand Down
@@ -0,0 +1,3 @@
export default {
hello: "from foo",
}
Expand Up @@ -15,6 +15,7 @@
"./client/*": {
"types": "./types/src/client/*.d.ts",
"import": "./esm/client/*.js"
}
},
"./*": "./*"
}
}

0 comments on commit 7920aad

Please sign in to comment.