From f10a8308d9f6bfb907c8a2458cbf78b4cfad88d2 Mon Sep 17 00:00:00 2001 From: Aryan Goharzad Date: Thu, 19 Jan 2023 13:53:11 -0500 Subject: Fixes youtube embed issues (#50) * fixes youtube embed * move extractMetaHtml test to its own file * tests cleanup * Add fallback for youtube meta data * lint * Check for youtube in the url domain * use hostname instead of full url to check for link domain * checks only for domain --- __tests__/lib/link-meta.test.ts | 49 +---------------------------------------- 1 file changed, 1 insertion(+), 48 deletions(-) (limited to '__tests__/lib/link-meta.test.ts') diff --git a/__tests__/lib/link-meta.test.ts b/__tests__/lib/link-meta.test.ts index 5931a4ccb..eaf8732b2 100644 --- a/__tests__/lib/link-meta.test.ts +++ b/__tests__/lib/link-meta.test.ts @@ -1,54 +1,7 @@ import {LikelyType, getLinkMeta, getLikelyType} from '../../src/lib/link-meta' +import {exampleComHtml} from './__mocks__/exampleComHtml' import {mockedRootStore} from '../../__mocks__/state-mock' -const exampleComHtml = ` - - - Example Domain - - - - - - - - - -
-

Example Domain

-

This domain is for use in illustrative examples in documents. You may use this - domain in literature without prior coordination or asking for permission.

-

More information...

-
- -` - describe('getLinkMeta', () => { const inputs = [ '', -- cgit 1.4.1