ci: Fix Credentials tests on node 18 (no-changelog) (#12889)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2025-01-28 13:17:35 +01:00
committed by GitHub
parent e146ad021a
commit 49b8693d7c

View File

@@ -92,9 +92,8 @@ describe('Credentials', () => {
} catch (error) { } catch (error) {
expect(error.constructor.name).toBe('CredentialDataError'); expect(error.constructor.name).toBe('CredentialDataError');
expect(error.extra).toEqual({ ...nodeCredentials, type: credentialType }); expect(error.extra).toEqual({ ...nodeCredentials, type: credentialType });
expect(error.cause).toEqual( expect(error.cause).toBeInstanceOf(SyntaxError);
new SyntaxError('Unexpected token \'i\', "invalid-json-string" is not valid JSON'), expect(error.cause.message).toMatch('Unexpected token ');
);
} }
}); });