From 8482d8ca61c728225090d8cd30876f04cc7716cf Mon Sep 17 00:00:00 2001 From: Lawrence Forooghian Date: Mon, 9 Dec 2024 09:44:26 -0300 Subject: [PATCH] Update expected error code in a test Realtime is now returning 40101 (invalid credentials) when unable to extract an app ID from the key. The Realtime team have confirmed that this new behaviour is correct and that the test should be updated [1]. [1] https://ably-real-time.slack.com/archives/CURL4U2FP/p1733479167314059?thread_ts=1733420816.469159&cid=CURL4U2FP --- test/realtime/failure.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/realtime/failure.test.js b/test/realtime/failure.test.js index 970e7b90e..4f214f32f 100644 --- a/test/realtime/failure.test.js +++ b/test/realtime/failure.test.js @@ -31,9 +31,9 @@ define(['ably', 'shared_helper', 'async', 'chai'], function (Ably, Helper, async var realtime = helper.AblyRealtime({ key: 'this.is:wrong', transports: transports }); realtime.connection.on('failed', function (connectionStateChange) { try { - expect(realtime.connection.errorReason.code).to.equal(40400, 'wrong error reason code on connection.'); + expect(realtime.connection.errorReason.code).to.equal(40101, 'wrong error reason code on connection.'); expect(connectionStateChange.reason.code).to.equal( - 40400, + 40101, 'wrong error reason code on connectionStateChange', ); expect(connectionStateChange.reason).to.deep.equal(