Skip to content

Commit

Permalink
WIP UTS — Disable use of bestTransport / availableTransport private APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
lawrence-forooghian committed Jun 20, 2024
1 parent 59833e3 commit dbda180
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
17 changes: 1 addition & 16 deletions test/common/modules/shared_helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,25 +95,10 @@ define([
}

get availableTransports() {
const helper = this.addingHelperFunction('availableTransports');
return helper._availableTransports;
}

get _availableTransports() {
this.recordPrivateApi('call.Utils.keysArray');
this.recordPrivateApi('call.ConnectionManager.supportedTransports');
this.recordPrivateApi('read.Realtime._transports');
return utils.keysArray(
clientModule.Ably.Realtime.ConnectionManager.supportedTransports(clientModule.Ably.Realtime._transports),
);
return ['web_socket'];
}

get bestTransport() {
const helper = this.addingHelperFunction('bestTransport');
return helper._bestTransport;
}

get _bestTransport() {
return this.availableTransports[0];
}

Expand Down
2 changes: 1 addition & 1 deletion test/realtime/init.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ define(['ably', 'shared_helper', 'chai'], function (Ably, Helper, chai) {
try {
realtime = helper.AblyRealtime({ transports: helper.availableTransports });
helper.recordPrivateApi('read.connectionManager.baseTransport');
expect(realtime.connection.connectionManager.baseTransport).to.equal('comet');
expect(realtime.connection.connectionManager.baseTransport).to.equal('web_socket');
helper.recordPrivateApi('read.connectionManager.webSocketTransportAvailable');
expect(realtime.connection.connectionManager.webSocketTransportAvailable).to.be.ok;
helper.closeAndFinish(done, realtime);
Expand Down

0 comments on commit dbda180

Please sign in to comment.