Explorar el Código

Limit visual regression tests to the first 10 HTML files for improved performance

codecalm hace 6 meses
padre
commit
fbe3680142
Se han modificado 1 ficheros con 1 adiciones y 6 borrados
  1. 1 6
      tests/visual.test.ts

+ 1 - 6
tests/visual.test.ts

@@ -4,14 +4,9 @@ import path from "path"
 
 const previewDir = path.join(__dirname, "../preview/dist")
 
-async function visualDiff(page: Page, url: string) {
-	await page.goto(url);
-	await expect(page).toHaveScreenshot({ fullPage: true });
-}
-
 const htmlFiles = fs.readdirSync(previewDir).filter((file) => file.endsWith(".html"))
 
-for (const file of htmlFiles) {
+for (const file of htmlFiles.slice(0, 10)) {
 	test(`Compare ${file}`, async ({ page }) => {
 		const filePath = `file://${path.join(previewDir, file)}`
 		await page.goto(filePath)