about summary refs log tree commit diff
path: root/__tests__
diff options
context:
space:
mode:
authorLars Kappert <lars@webpro.nl>2024-11-05 13:43:20 +0100
committerGitHub <noreply@github.com>2024-11-05 12:43:20 +0000
commitf8fb6cb9b3aabdc3cfb08675d63e48bdd5e43f61 (patch)
tree5255abb994ec3682815d2258f9aea7677029988f /__tests__
parentab4e36115b390cb69b2dcd31e340898afcbef22a (diff)
downloadvoidsky-f8fb6cb9b3aabdc3cfb08675d63e48bdd5e43f61.tar.zst
Fix start value in youtube embed by removing "s" from url param (#6113)
Diffstat (limited to '__tests__')
-rw-r--r--__tests__/lib/string.test.ts12
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',
     },
     {