diff --git a/test/htmls/og-image.html b/test/htmls/og-image.html new file mode 100644 index 0000000..3c380d7 --- /dev/null +++ b/test/htmls/og-image.html @@ -0,0 +1,13 @@ + + + +
+ + +Hey hey hey syuilo.
+ + diff --git a/test/index.js b/test/index.js index b251395..c3f3989 100644 --- a/test/index.js +++ b/test/index.js @@ -48,4 +48,17 @@ describe('OGP', () => { done(); }); }); + + it('thumbnail', done => { + const app = express(); + app.use((req, res) => { + res.sendFile(__dirname + '/htmls/og-image.html'); + }); + const server = app.listen(80, async () => { + const summary = await summaly('http://localhost'); + assert.equal(summary.thumbnail, 'https://himasaku.net/himasaku.png'); + server.close(); + done(); + }); + }); });