mirror of
https://github.com/misskey-dev/summaly.git
synced 2025-05-16 02:57:35 +09:00
[Test] Add the og:site_name test
This commit is contained in:
parent
9880b415de
commit
0e81c537e7
13
test/htmls/og-site_name.html
Normal file
13
test/htmls/og-site_name.html
Normal 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>
|
@ -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) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user