Skip to content

Commit

Permalink
Run each accessibility test in a new page
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrotherham committed Oct 17, 2023
1 parent 2876dec commit 23941bb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions __tests__/accessibility-audit.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,12 @@ describe('Accessibility audit', () => {
it.each(globSync('**/index.html', { cwd: paths.public }))(
'validates %s',
async (path) => {
const page = await browser.newPage()

await goTo(page, `/${slash(path)}`)
await expect(axe(page)).resolves.toHaveNoViolations()

await page.close()
},
10000
)
Expand Down

0 comments on commit 23941bb

Please sign in to comment.