Skip to content

Commit

Permalink
Fix social tests to support Node 20
Browse files Browse the repository at this point in the history
  • Loading branch information
LoicPoullain committed Sep 2, 2023
1 parent 17773c7 commit 5f63795
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/social/src/google-provider.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.`);
}
}
});

Expand Down

0 comments on commit 5f63795

Please sign in to comment.