Revert "remove links that can't produce a thumb"

This reverts commit 985b92b4e6.
This commit is contained in:
Hailey
2023-12-27 22:23:54 -08:00
parent 985b92b4e6
commit 4895ded8b5
2 changed files with 165 additions and 2 deletions
+91 -1
View File
@@ -426,10 +426,34 @@ describe('parseEmbedPlayerFromUrl', () => {
'https://giphy.com/gif/some-random-gif-name-gifId',
'https://giphy.com/gifs/',
'https://media.giphy.com/media/gifId/giphy.gif',
'https://media0.giphy.com/media/gifId/giphy.gif',
'https://media1.giphy.com/media/gifId/giphy.gif',
'https://media2.giphy.com/media/gifId/giphy.gif',
'https://media3.giphy.com/media/gifId/giphy.gif',
'https://media4.giphy.com/media/gifId/giphy.gif',
'https://media5.giphy.com/media/gifId/giphy.gif',
'https://media1.google.com/media/gifId/giphy.gif',
'https://media.giphy.com/media/trackingId/gifId/giphy.gif',
'https://i.giphy.com/media/gifId/giphy.gif',
'https://i.giphy.com/media/gifId/giphy.gif',
'https://i.giphy.com/gifId.gif',
'https://i.giphy.com/gifId.gif',
'https://media1.tenor.com/m/gifId/someName.gif',
'https://media.tenor.com/m/gifId/someName.mp4',
'https://media1.tenor.com/m/gifId',
'https://tenor.com/view/gifId',
'https://tenor.com/notView/gifId',
'https://tenor.com/view',
'https://tenor.com/view/gifId.gif',
'https://c.tenor.com/gifId/tenor.gif',
'https://c.tenor.com/gifId/tenor.webp',
'https://c.tenor.com/gifId/tenor.mp4',
]
const outputs = [
@@ -556,7 +580,63 @@ describe('parseEmbedPlayerFromUrl', () => {
{
type: 'gif',
playerUri: 'https://i.giphy.com/media/gifId/giphy.webp',
playerUri: 'https://i.giphy.com/media/gifId/giphy.gif',
},
undefined,
undefined,
{
type: 'gif',
playerUri: 'https://i.giphy.com/media/gifId/giphy.gif',
},
{
type: 'gif',
playerUri: 'https://i.giphy.com/media/gifId/giphy.gif',
},
{
type: 'gif',
playerUri: 'https://i.giphy.com/media/gifId/giphy.gif',
},
{
type: 'gif',
playerUri: 'https://i.giphy.com/media/gifId/giphy.gif',
},
{
type: 'gif',
playerUri: 'https://i.giphy.com/media/gifId/giphy.gif',
},
{
type: 'gif',
playerUri: 'https://i.giphy.com/media/gifId/giphy.gif',
},
undefined,
undefined,
{
type: 'gif',
playerUri: 'https://i.giphy.com/media/gifId/giphy.gif',
},
{
type: 'gif',
playerUri: 'https://i.giphy.com/media/gifId/giphy.gif',
},
{
type: 'gif',
playerUri: 'https://i.giphy.com/media/gifId/giphy.gif',
},
{
type: 'gif',
playerUri: 'https://i.giphy.com/media/gifId/giphy.gif',
},
{
type: 'gif',
playerUri: 'https://i.giphy.com/media/gifId/giphy.gif',
},
{
type: 'gif',
playerUri: 'https://media1.tenor.com/m/gifId/someName.gif',
},
undefined,
undefined,
@@ -571,6 +651,16 @@ describe('parseEmbedPlayerFromUrl', () => {
type: 'gif',
playerUri: 'https://tenor.com/view/gifId.gif',
},
{
type: 'gif',
playerUri: 'https://c.tenor.com/gifId/tenor.gif',
},
{
type: 'gif',
playerUri: 'https://c.tenor.com/gifId/tenor.webp',
},
undefined,
]
it('correctly grabs the correct id from uri', () => {