From 0e8a1349c5d60ddf3c143caec1acb93589ea562f Mon Sep 17 00:00:00 2001 From: Harper Reed Date: Sat, 3 Jan 2026 21:07:32 +0900 Subject: [PATCH] test(lists): add boundary and fragment tests for extractListId MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Test that 5-digit IDs (minimum length) are accepted - Test that URLs with fragment identifiers work correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- tests/cli.test.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/cli.test.ts b/tests/cli.test.ts index b5993e5..95b090c 100644 --- a/tests/cli.test.ts +++ b/tests/cli.test.ts @@ -95,8 +95,17 @@ describe('CLI utilities', () => { expect(extractListId('1234')).toBeNull(); }); + it('should accept minimum 5-digit IDs', () => { + expect(extractListId('12345')).toBe('12345'); + }); + it('should trim whitespace from input', () => { expect(extractListId(' 1234567890123456789 ')).toBe('1234567890123456789'); }); + + it('should extract ID from URL with fragment', () => { + const url = 'https://x.com/i/lists/1234567890123456789#section'; + expect(extractListId(url)).toBe('1234567890123456789'); + }); }); });