mirror of
https://github.com/misskey-dev/summaly.git
synced 2025-05-15 02:27:34 +09:00
test for type: video
This commit is contained in:
parent
28e0552f5c
commit
d59a508190
@ -270,6 +270,14 @@ describe("oEmbed", () => {
|
|||||||
expect(summary.player.height).toBe(300);
|
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 () => {
|
test('children are ignored', async () => {
|
||||||
await setUpFastify('oembed-iframe-child.json');
|
await setUpFastify('oembed-iframe-child.json');
|
||||||
const summary = await summaly(host);
|
const summary = await summaly(host);
|
||||||
|
7
test/oembed/oembed-video.json
Normal file
7
test/oembed/oembed-video.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"version": "1.0",
|
||||||
|
"type": "video",
|
||||||
|
"html": "<iframe src='https://example.com/'></iframe>",
|
||||||
|
"width": 500,
|
||||||
|
"height": 300
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user