Skip to content

Commit

Permalink
test(compartment-mapper): Mark and sweep unused module descriptors
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskowal committed Oct 24, 2024
1 parent d37a434 commit 51f3a96
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions packages/compartment-mapper/test/retained.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,14 @@ test('archives only contain compartments retained by modules', async t => {
// Notably absent:
// 'sweep-v1.0.0',
]);
t.deepEqual(
Object.keys(compartmentMap.compartments['app-v1.0.0'].modules).sort(),
[
'./app.js',
// Notably absent: 'app',
'mk1',
// Notably absent: 'mk1/bogus.js',
// Notably absent: 'sweep',
],
);
});

0 comments on commit 51f3a96

Please sign in to comment.