diff options
Diffstat (limited to '__tests__')
-rw-r--r-- | __tests__/lib/string.test.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/__tests__/lib/string.test.ts b/__tests__/lib/string.test.ts index f226de992..e212ef5c9 100644 --- a/__tests__/lib/string.test.ts +++ b/__tests__/lib/string.test.ts @@ -335,8 +335,10 @@ describe('shortenLinks', () => { describe('parseEmbedPlayerFromUrl', () => { const inputs = [ 'https://youtu.be/videoId', + 'https://youtu.be/videoId?t=1s', 'https://www.youtube.com/watch?v=videoId', 'https://www.youtube.com/watch?v=videoId&feature=share', + 'https://www.youtube.com/watch?v=videoId&t=1s', 'https://youtube.com/watch?v=videoId', 'https://youtube.com/watch?v=videoId&feature=share', 'https://youtube.com/shorts/videoId', @@ -444,6 +446,11 @@ describe('parseEmbedPlayerFromUrl', () => { { type: 'youtube_video', source: 'youtube', + playerUri: 'https://bsky.app/iframe/youtube.html?videoId=videoId&start=1', + }, + { + type: 'youtube_video', + source: 'youtube', playerUri: 'https://bsky.app/iframe/youtube.html?videoId=videoId&start=0', }, { @@ -454,6 +461,11 @@ describe('parseEmbedPlayerFromUrl', () => { { type: 'youtube_video', source: 'youtube', + playerUri: 'https://bsky.app/iframe/youtube.html?videoId=videoId&start=1', + }, + { + type: 'youtube_video', + source: 'youtube', playerUri: 'https://bsky.app/iframe/youtube.html?videoId=videoId&start=0', }, { |