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/__mocks__/exampleComHtml.ts | 47 +++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 __tests__/lib/__mocks__/exampleComHtml.ts (limited to '__tests__/lib/__mocks__/exampleComHtml.ts') diff --git a/__tests__/lib/__mocks__/exampleComHtml.ts b/__tests__/lib/__mocks__/exampleComHtml.ts new file mode 100644 index 000000000..6633e40ca --- /dev/null +++ b/__tests__/lib/__mocks__/exampleComHtml.ts @@ -0,0 +1,47 @@ +export 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...

+
+ +` -- cgit 1.4.1