mirror of
https://github.com/misskey-dev/summaly.git
synced 2025-06-13 23:27:53 +09:00
[Test] いい感じにした
This commit is contained in:
parent
7e3c650df2
commit
c0c51027d1
@ -3,7 +3,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta property="og:description" content="KISS is an acronym for 'Keep it simple, stupid' as a design principle noted by the U.S. Navy in 1960.">
|
||||
<meta property="og:description" content="Strawberry Pasta">
|
||||
<title>YEE HAW</title>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -24,13 +24,27 @@ process.on('unhandledRejection', console.dir);
|
||||
|
||||
describe('OGP', () => {
|
||||
it('title', done => {
|
||||
const server = express();
|
||||
server.use((req, res) => {
|
||||
const app = express();
|
||||
app.use((req, res) => {
|
||||
res.sendFile(__dirname + '/htmls/og-title.html');
|
||||
});
|
||||
server.listen(80, async () => {
|
||||
const server = app.listen(80, async () => {
|
||||
const summary = await summaly('http://localhost');
|
||||
assert.equal(summary.title, 'Strawberry Pasta');
|
||||
server.close();
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('description', done => {
|
||||
const app = express();
|
||||
app.use((req, res) => {
|
||||
res.sendFile(__dirname + '/htmls/og-description.html');
|
||||
});
|
||||
const server = app.listen(80, async () => {
|
||||
const summary = await summaly('http://localhost');
|
||||
assert.equal(summary.description, 'Strawberry Pasta');
|
||||
server.close();
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user