about summary refs log tree commit diff
path: root/__tests__/lib
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-01-19 12:30:28 -0600
committerGitHub <noreply@github.com>2023-01-19 12:30:28 -0600
commit9230d52ff596056429a773298b2728619afe3432 (patch)
treef388a79f13512caa1aa0478afc688b29ab2f085b /__tests__/lib
parent0536a6afcfce0ef2bebfc7cacf13d3d80ef82229 (diff)
downloadvoidsky-9230d52ff596056429a773298b2728619afe3432.tar.zst
Improve link meta fetching for bsky links (#54)
* Add share dropdown item to profiles

* Temporary improvement for links to content on the network

* Enlarge text slightly on embed cards
Diffstat (limited to '__tests__/lib')
-rw-r--r--__tests__/lib/link-meta.test.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/__tests__/lib/link-meta.test.ts b/__tests__/lib/link-meta.test.ts
index 5df5153ee..5931a4ccb 100644
--- a/__tests__/lib/link-meta.test.ts
+++ b/__tests__/lib/link-meta.test.ts
@@ -1,4 +1,5 @@
 import {LikelyType, getLinkMeta, getLikelyType} from '../../src/lib/link-meta'
+import {mockedRootStore} from '../../__mocks__/state-mock'
 
 const exampleComHtml = `<!doctype html>
 <html>
@@ -59,6 +60,7 @@ describe('getLinkMeta', () => {
     'https://example.com/audio.ogg',
     'https://example.com/text.txt',
     'https://example.com/javascript.js',
+    'https://bsky.app/',
     'https://bsky.app/index.html',
   ]
   const outputs = [
@@ -106,6 +108,12 @@ describe('getLinkMeta', () => {
     },
     {
       likelyType: LikelyType.AtpData,
+      url: '/',
+      title: 'Bluesky',
+      description: 'A new kind of social network',
+    },
+    {
+      likelyType: LikelyType.AtpData,
       url: '/index.html',
       title: 'Not found',
     },
@@ -127,7 +135,7 @@ describe('getLinkMeta', () => {
         })
       })
       const input = inputs[i]
-      const output = await getLinkMeta(input)
+      const output = await getLinkMeta(mockedRootStore, input)
       expect(output).toEqual(outputs[i])
     }
   })