File tree Expand file tree Collapse file tree 3 files changed +2
-13
lines changed
Expand file tree Collapse file tree 3 files changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -75,10 +75,6 @@ function getPasswordHashParts(password: string) {
7575}
7676
7777async function checkIsCommonPassword ( password : string ) {
78- // In mocks mode we don't want to make external HTTP requests for password
79- // strength checks (it can hang CI / e2e test runs and adds nondeterminism).
80- if ( process . env . MOCKS === 'true' ) return false
81-
8278 const [ prefix , suffix ] = getPasswordHashParts ( password )
8379 try {
8480 const response = await fetchWithTimeout (
Original file line number Diff line number Diff line change @@ -42,13 +42,6 @@ export async function gravatarExistsForEmail({
4242 staleWhileRevalidate : 1000 * 60 * 60 * 24 * 365 ,
4343 checkValue : ( prevValue ) => typeof prevValue === 'boolean' ,
4444 getFreshValue : async ( context ) => {
45- // In mocks mode we should not make external HTTP requests (can hang/flake
46- // CI/e2e runs, especially with Node v24 fetch abort issues).
47- if ( process . env . MOCKS === 'true' ) {
48- context . metadata . ttl = 1000 * 60 * 60 * 24 * 365
49- return false
50- }
51-
5245 const gravatarUrl = getAvatar ( email , { fallback : '404' } )
5346 try {
5447 const timeoutMs = context . background || forceFresh ? 1000 * 10 : 100
Original file line number Diff line number Diff line change @@ -54,8 +54,8 @@ const miscHandlers = [
5454 } ,
5555 ) ,
5656 http . head ( 'https://www.gravatar.com/avatar/:md5Hash' , async ( ) => {
57- if ( await isConnectedToTheInternet ( ) ) return passthrough ( )
58-
57+ // In mocks mode we want deterministic behavior and to avoid external HTTP
58+ // requests that can flake in CI (even when DNS works).
5959 return HttpResponse . json ( null , { status : 404 } )
6060 } ) ,
6161 http . get ( / h t t p : \/ \/ ( l o c a l h o s t | 1 2 7 \. 0 \. 0 \. 1 ) : \d + \/ .* / , async ( ) =>
You can’t perform that action at this time.
0 commit comments