test for type: video

This commit is contained in:
Kagami Sascha Rosylight 2023-03-11 21:45:49 +01:00
parent 28e0552f5c
commit d59a508190
2 changed files with 15 additions and 0 deletions

View File

@ -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);

View File

@ -0,0 +1,7 @@
{
"version": "1.0",
"type": "video",
"html": "<iframe src='https://example.com/'></iframe>",
"width": 500,
"height": 300
}