Skip to content

Commit 1f0eed3

Browse files
committed
test: enhance unit tests for aggregateAndSortGroups with additional input scenarios
1 parent 0c9a6a6 commit 1f0eed3

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

packages/plugin-bundle-stats/src/lib/runner/audits/details/table.unit.test.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ describe('aggregateAndSortGroups', () => {
1414
'src/feature-2.ts': { bytes: 10000 },
1515
},
1616
},
17+
'dist/utils.js': {
18+
path: 'dist/utils.js',
19+
bytes: 425,
20+
inputs: {
21+
'src/feature-1.ts': { bytes: 200 },
22+
'src/feature-2.ts': { bytes: 225 },
23+
},
24+
},
1725
},
1826
[
1927
{
@@ -28,8 +36,8 @@ describe('aggregateAndSortGroups', () => {
2836
),
2937
).toStrictEqual({
3038
groups: [
31-
{ title: 'Feature 2', totalBytes: 10000, icon: undefined },
32-
{ title: 'Feature *', totalBytes: 8000, icon: undefined },
39+
{ title: 'Feature 2', totalBytes: 10225, icon: undefined },
40+
{ title: 'Feature *', totalBytes: 8200, icon: undefined },
3341
],
3442
restGroup: { title: 'Rest', totalBytes: 0 },
3543
});

0 commit comments

Comments
 (0)