diff --git a/package.json b/package.json index d6c2b2ea..f34a287a 100644 --- a/package.json +++ b/package.json @@ -101,6 +101,7 @@ "typecheck": "tsc --noEmit", "test": "vitest run --passWithNoTests", "test:og": "vitest run tests/og-image.test.ts", + "test:e2e": "vitest run tests/*.e2e.test.ts", "check:og": "tsx scripts/check-og-images.ts", "check:a11y": "pa11y-ci", "check:wcag": "tsx ./scripts/wcag-sitemap.ts", diff --git a/tests/brochure-modal.test.ts b/tests/brochure-modal.e2e.test.ts similarity index 95% rename from tests/brochure-modal.test.ts rename to tests/brochure-modal.e2e.test.ts index c62d786f..4660590a 100644 --- a/tests/brochure-modal.test.ts +++ b/tests/brochure-modal.e2e.test.ts @@ -14,6 +14,7 @@ const BASE_URL = process.env.TEST_URL || 'http://127.0.0.1:3000'; beforeAll(async () => { browser = await puppeteer.launch({ headless: true, + executablePath: process.env.PUPPETEER_EXECUTABLE_PATH || process.env.CHROME_PATH || undefined, args: ['--no-sandbox', '--disable-setuid-sandbox'], }); }); diff --git a/vitest.config.mts b/vitest.config.mts index 46f1f04a..27d541ce 100644 --- a/vitest.config.mts +++ b/vitest.config.mts @@ -15,7 +15,7 @@ export default defineConfig({ test: { environment: 'happy-dom', globals: true, - exclude: ['**/node_modules/**', '**/.next/**', '**/dist/**'], + exclude: ['**/node_modules/**', '**/.next/**', '**/dist/**', '**/*.e2e.test.ts'], include: ['**/*.test.{ts,tsx}'], coverage: { provider: 'v8',