Skip to content

Commit 13a6fd8

Browse files
committed
test: add live test for private/userFutureData stream
1 parent 01e6921 commit 13a6fd8

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

tests/ws-endpoints-migration.test.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,30 @@ describe('Live: production public stream (bookTicker via /public/)', function ()
198198
});
199199
});
200200

201+
describe('Live: demo private stream (userFutureData via /private/)', function () {
202+
let endpoint;
203+
204+
beforeEach(function (done) {
205+
this.timeout(TIMEOUT);
206+
demoBinance.userFutureData(
207+
undefined, // all_updates_callback
208+
undefined, // margin_call_callback
209+
undefined, // account_update_callback
210+
undefined, // order_update_callback
211+
(a_endpoint) => { // subscribed_callback
212+
endpoint = a_endpoint;
213+
stopSockets(demoBinance);
214+
done();
215+
}
216+
);
217+
});
218+
219+
it('connects to private user data stream successfully', function () {
220+
assert(endpoint !== undefined, 'should have received subscription endpoint');
221+
assert(typeof endpoint === 'string', 'endpoint should be a string');
222+
});
223+
});
224+
201225
describe('Live: production combined market stream (kline via /market/)', function () {
202226
let candle;
203227
let cnt = 0;

0 commit comments

Comments
 (0)