Skip to content

Commit

Permalink
add playwright test for no JS errors on TOC
Browse files Browse the repository at this point in the history
  • Loading branch information
cscheid committed Jan 11, 2025
1 parent 21e21d8 commit a1db9eb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/integration/playwright/tests/html-toc-js.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { expect, Page, test } from "@playwright/test";

const testPages = {
'posts': 'table.html',
};

test("toc navigation doesn't crash", async ({ page }) => {
const messages: string[] = [];
page.on('pageerror', (error) => {
messages.push(`[${error.name}] ${error.message}`);
});
await page.goto('./blog/simple-blog/_site/posts/post-with-code/index.html');
expect(messages).toStrictEqual([]);
});

0 comments on commit a1db9eb

Please sign in to comment.