diff --git a/test/index.ts b/test/index.ts index e1898ea..98e0dc4 100644 --- a/test/index.ts +++ b/test/index.ts @@ -278,6 +278,12 @@ describe("oEmbed", () => { expect(summary.player.height).toBe(300); }); + test('max height', async () => { + await setUpFastify('oembed-too-tall.json'); + const summary = await summaly(host); + expect(summary.player.height).toBe(1024); + }); + test('children are ignored', async () => { await setUpFastify('oembed-iframe-child.json'); const summary = await summaly(host); diff --git a/test/oembed/oembed-too-tall.json b/test/oembed/oembed-too-tall.json new file mode 100644 index 0000000..3f857c0 --- /dev/null +++ b/test/oembed/oembed-too-tall.json @@ -0,0 +1,6 @@ +{ + "version": "1.0", + "type": "rich", + "html": "", + "height": 3000 +}