Skip to content

Commit 0dda17e

Browse files
author
Ilan Bar-Magen
committed
tests for links rel='alternate'
1 parent 0e681ff commit 0dda17e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tests/examples/many-pages/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<head>
44
<meta charset="utf-8">
5+
<link rel="alternate" href='/5' />
56
</head>
67

78
<body>

tests/run.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,14 @@ describe("many pages", () => {
157157
} = mockFs();
158158
beforeAll(() => snapRun(fs, { source }));
159159
test("crawls all links and saves as index.html in separate folders", () => {
160-
expect(filesCreated()).toEqual(6);
160+
expect(filesCreated()).toEqual(7);
161161
expect(names()).toEqual(
162162
expect.arrayContaining([
163163
`/${source}/1/index.html`, // without slash in the end
164164
`/${source}/2/index.html`, // with slash in the end
165165
`/${source}/3/index.html`, // ignores hash
166-
`/${source}/4/index.html` // ignores query
166+
`/${source}/4/index.html`, // ignores query
167+
`/${source}/5/index.html`, // link rel="alternate"
167168
])
168169
);
169170
});

0 commit comments

Comments
 (0)