ci: Fix Credentials tests on node 18 (no-changelog) (#12889)
Some checks are pending
Test Master / install-and-build (push) Waiting to run
Test Master / Unit tests (18.x) (push) Blocked by required conditions
Test Master / Unit tests (20.x) (push) Blocked by required conditions
Test Master / Unit tests (22.4) (push) Blocked by required conditions
Test Master / Lint (push) Blocked by required conditions
Test Master / Notify Slack on failure (push) Blocked by required conditions
Benchmark Docker Image CI / build (push) Waiting to run

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2025-01-28 13:17:35 +01:00 committed by GitHub
parent e146ad021a
commit 49b8693d7c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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 ');
);
} }
}); });