diff --git a/test/index.ts b/test/index.ts index c457273..a8e7fb4 100644 --- a/test/index.ts +++ b/test/index.ts @@ -270,6 +270,14 @@ describe("oEmbed", () => { expect(summary.player.height).toBe(300); }); + test('type: video', async () => { + await setUpFastify('oembed-video.json'); + const summary = await summaly(host); + expect(summary.player.url).toBe('https://example.com/'); + expect(summary.player.width).toBe(500); + expect(summary.player.height).toBe(300); + }); + test('children are ignored', async () => { await setUpFastify('oembed-iframe-child.json'); const summary = await summaly(host); diff --git a/test/oembed/oembed-video.json b/test/oembed/oembed-video.json new file mode 100644 index 0000000..7537c7c --- /dev/null +++ b/test/oembed/oembed-video.json @@ -0,0 +1,7 @@ +{ + "version": "1.0", + "type": "video", + "html": "", + "width": 500, + "height": 300 +}