chore: reformat with 2-space indentation (biome)

This commit is contained in:
Peter Steinberger
2025-11-28 08:09:32 +01:00
parent 0f0bd5d680
commit 5ae8801b23
11 changed files with 1170 additions and 1169 deletions
+23 -23
View File
@@ -2,31 +2,31 @@ import { describe, expect, it } from 'vitest';
import { extractTweetId } from '../src/lib/extract-tweet-id.js';
describe('CLI utilities', () => {
describe('extractTweetId', () => {
it('should extract ID from x.com URL', () => {
const url = 'https://x.com/steipete/status/1234567890123456789';
expect(extractTweetId(url)).toBe('1234567890123456789');
});
describe('extractTweetId', () => {
it('should extract ID from x.com URL', () => {
const url = 'https://x.com/steipete/status/1234567890123456789';
expect(extractTweetId(url)).toBe('1234567890123456789');
});
it('should extract ID from twitter.com URL', () => {
const url = 'https://twitter.com/steipete/status/1234567890123456789';
expect(extractTweetId(url)).toBe('1234567890123456789');
});
it('should extract ID from twitter.com URL', () => {
const url = 'https://twitter.com/steipete/status/1234567890123456789';
expect(extractTweetId(url)).toBe('1234567890123456789');
});
it('should extract ID from URL with query params', () => {
const url = 'https://x.com/steipete/status/1234567890123456789?s=20';
expect(extractTweetId(url)).toBe('1234567890123456789');
});
it('should extract ID from URL with query params', () => {
const url = 'https://x.com/steipete/status/1234567890123456789?s=20';
expect(extractTweetId(url)).toBe('1234567890123456789');
});
it('should return ID as-is if already an ID', () => {
const id = '1234567890123456789';
expect(extractTweetId(id)).toBe('1234567890123456789');
});
it('should return ID as-is if already an ID', () => {
const id = '1234567890123456789';
expect(extractTweetId(id)).toBe('1234567890123456789');
});
it('should handle URLs with www prefix', () => {
// Note: our regex handles this because \w+ matches any word chars after the domain
const url = 'https://x.com/user_name/status/1234567890123456789';
expect(extractTweetId(url)).toBe('1234567890123456789');
});
});
it('should handle URLs with www prefix', () => {
// Note: our regex handles this because \w+ matches any word chars after the domain
const url = 'https://x.com/user_name/status/1234567890123456789';
expect(extractTweetId(url)).toBe('1234567890123456789');
});
});
});