Refine isE2ETestMode type definition to improve type safety and readability

This commit is contained in:
Felipe Cardoso
2025-11-06 00:49:46 +01:00
parent f9f58b5f27
commit d0f1a7cc4b

View File

@@ -25,7 +25,7 @@ export type StorageMethod = 'cookie' | 'localStorage';
* This flag is set by E2E tests to skip encryption for easier testing * This flag is set by E2E tests to skip encryption for easier testing
*/ */
function isE2ETestMode(): boolean { function isE2ETestMode(): boolean {
return typeof window !== 'undefined' && (window as any).__PLAYWRIGHT_TEST__ === true; return typeof window !== 'undefined' && (window as { __PLAYWRIGHT_TEST__?: boolean }).__PLAYWRIGHT_TEST__ === true;
} }
/** /**