Skip to content

Commit

Permalink
chore: add test for subpath pattern with no "*" in value (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
bnussman authored Mar 6, 2023
1 parent 5d9601d commit 1a0164d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,21 @@ describe('$.exports', it => {
pass(pkg, './test/innersub/dirtest/inner/file.js', 'foobar/dirtest/inner');
});

it('exports["./dir/*"] :: "*" value', () => {
let pkg: Package = {
"name": "foobar",
"exports": {
".": "./dir/index.js",
"./dir": "./dir/index.js",
"./dir/*": "./dir/index.js"
}
};

pass(pkg, './dir/index.js', 'foobar');
pass(pkg, './dir/index.js', 'foobar/dir');
pass(pkg, './dir/index.js', 'foobar/dir/profile');
});

it('exports["./dir*"] :: share "name" start', () => {
let pkg: Package = {
"name": "director",
Expand Down

0 comments on commit 1a0164d

Please sign in to comment.