[Test] Add the og:site_name test

This commit is contained in:
syuilo 2017-02-08 17:46:40 +09:00
parent 9880b415de
commit 0e81c537e7
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta property="og:site_name" content="Strawberry Pasta">
<title>YEE HAW</title>
</head>
<body>
<h1>Yo</h1>
<p>Hey hey hey syuilo.</p>
</body>
</html>

View File

@ -49,6 +49,19 @@ describe('OGP', () => {
});
});
it('site_name', done => {
const app = express();
app.use((req, res) => {
res.sendFile(__dirname + '/htmls/og-site_name.html');
});
const server = app.listen(80, async () => {
const summary = await summaly('http://localhost');
assert.equal(summary.sitename, 'Strawberry Pasta');
server.close();
done();
});
});
it('thumbnail', done => {
const app = express();
app.use((req, res) => {