Skip to content

Commit a1db9eb

Browse files
committed
add playwright test for no JS errors on TOC
1 parent 21e21d8 commit a1db9eb

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { expect, Page, test } from "@playwright/test";
2+
3+
const testPages = {
4+
'posts': 'table.html',
5+
};
6+
7+
test("toc navigation doesn't crash", async ({ page }) => {
8+
const messages: string[] = [];
9+
page.on('pageerror', (error) => {
10+
messages.push(`[${error.name}] ${error.message}`);
11+
});
12+
await page.goto('./blog/simple-blog/_site/posts/post-with-code/index.html');
13+
expect(messages).toStrictEqual([]);
14+
});

0 commit comments

Comments
 (0)