test: parameterize CHRNX browser environment

This commit is contained in:
chrnx committed 2026-08-12 18:49:05 -05:00
1 parent 6a131057d5
commit 367d4db916
2 files changed
+10 -1

No files matched your search

+9
View File
@@ -2,6 +2,15 @@ import assert from 'node:assert/strict';
import { readFile, readdir } from 'node:fs/promises';
import test from 'node:test';
test( 'Playwright selects an environment-specific base URL with a root default', async () => {
const config = await readFile( 'playwright.config.mjs', 'utf8' );
assert.match(
config,
/baseURL:\s*process\.env\.CHRNX_E2E_BASE_URL\s*\|\|\s*['"]http:\/\/localhost:8888['"]/,
);
} );
test( 'Playwright seeds deterministic local fixtures once outside browser workers', async () => {
const config = await readFile( 'playwright.config.mjs', 'utf8' );
const setup = await readFile( 'tests/e2e/global-setup.mjs', 'utf8' );