diff --git a/packages/social/src/google-provider.service.spec.ts b/packages/social/src/google-provider.service.spec.ts index 640c053c8c..09bd6e9ac5 100644 --- a/packages/social/src/google-provider.service.spec.ts +++ b/packages/social/src/google-provider.service.spec.ts @@ -46,7 +46,13 @@ describe('GoogleProvider', () => { if (!(error instanceof InvalidJWTError)) { throw error; } - strictEqual(error.message, 'The ID token returned by Google is not a valid JWT: Unexpected end of JSON input.'); + try { + // Node 18 + strictEqual(error.message, 'The ID token returned by Google is not a valid JWT: Unexpected end of JSON input.'); + } catch { + // Node 20 + strictEqual(error.message, `The ID token returned by Google is not a valid JWT: Expected property name or '}' in JSON at position 1.`); + } } });