Check for CI environment variable (set by GitHub Actions and most CI systems) instead of VITEST to skip beforeunload handler registration during automated tests.
Check for CI environment variable (set by GitHub Actions and most CI systems) instead of VITEST to skip beforeunload handler registration during automated tests.