Skip to content

Commit f2586d6

Browse files
yangshunclaude
andcommitted
Fix CLI sizes test regex to match kB/MB suffixes
The regex /\dB/ fails on '4.1kB' since 'k' sits between the digit and 'B'. Use the same pattern as index tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9f16d3d commit f2586d6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/cli.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,10 @@ describe('cli', () => {
234234
// Without sizes, just the filename
235235
expect(withoutSizes).toContain('alpha.txt');
236236
expect(withoutSizes).not.toMatch(/\dB/);
237-
// With sizes, each line should have a size prefix like "0B" or "1kB"
237+
// With sizes, each line should have a size prefix like "5B" or "4.1kB"
238238
const lines = withSizes.split('\n');
239239
for (const line of lines) {
240-
expect(line).toMatch(/\dB/);
240+
expect(line).toMatch(/\d+(\.\d+)?(B|kB|MB)/);
241241
}
242242
});
243243

0 commit comments

Comments
 (0)