Skip to content

Commit

Permalink
recreate a bug in reverse-exports package
Browse files Browse the repository at this point in the history
  • Loading branch information
mansona committed Nov 20, 2023
1 parent 9606cac commit 30a1199
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions packages/reverse-exports/tests/reverse-exports.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,24 @@ describe('reverse exports', function () {
'You tried to reverse exports for the file `./foo.bar` in package `my-addon` but it does not match any of the exports rules defined in package.json. This means it should not be possible to access directly.'
);
});

it('breaks TODO rename this test to something better', function () {
const packageJson = {
name: 'my-v2-addon',
exports: {
'.': './dist/index.js',
'./*': {
types: './dist/*.d.ts',
default: './dist/*.js',
},
'./addon-main.js': './addon-main.js',
},
};

expect(reversePackageExports(packageJson, './dist/_app_/components/welcome-page.js')).toBe(
'my-v2-addon/_app_/components/welcome-page'
);
});
});

describe('_findKeyRecursively', function () {
Expand Down

0 comments on commit 30a1199

Please sign in to comment.