@webex/internal-plugin-mercury 3.0.0-next.3 → 3.0.0-next.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/mercury.js
CHANGED
|
@@ -428,7 +428,7 @@ var Mercury = _webexCore.WebexPlugin.extend((_dec = (0, _common.deprecated)('Mer
|
|
|
428
428
|
this.logger.info("".concat(this.namespace, ": reconnecting"));
|
|
429
429
|
return this.connect(webSocketUrl);
|
|
430
430
|
},
|
|
431
|
-
version: "3.0.0-next.
|
|
431
|
+
version: "3.0.0-next.5"
|
|
432
432
|
}, ((0, _applyDecoratedDescriptor2.default)(_obj, "connect", [_common.oneFlight], (0, _getOwnPropertyDescriptor.default)(_obj, "connect"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "disconnect", [_common.oneFlight], (0, _getOwnPropertyDescriptor.default)(_obj, "disconnect"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "listen", [_dec], (0, _getOwnPropertyDescriptor.default)(_obj, "listen"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "stopListening", [_dec2], (0, _getOwnPropertyDescriptor.default)(_obj, "stopListening"), _obj)), _obj)));
|
|
433
433
|
var _default = exports.default = Mercury;
|
|
434
434
|
//# sourceMappingURL=mercury.js.map
|
package/package.json
CHANGED
|
@@ -29,27 +29,27 @@
|
|
|
29
29
|
"@webex/eslint-config-legacy": "0.0.0",
|
|
30
30
|
"@webex/jest-config-legacy": "0.0.0",
|
|
31
31
|
"@webex/legacy-tools": "0.0.0",
|
|
32
|
-
"@webex/test-helper-chai": "3.0.0-next.
|
|
33
|
-
"@webex/test-helper-mocha": "3.0.0-next.
|
|
34
|
-
"@webex/test-helper-mock-webex": "3.0.0-next.
|
|
35
|
-
"@webex/test-helper-test-users": "3.0.0-next.
|
|
32
|
+
"@webex/test-helper-chai": "3.0.0-next.4",
|
|
33
|
+
"@webex/test-helper-mocha": "3.0.0-next.4",
|
|
34
|
+
"@webex/test-helper-mock-webex": "3.0.0-next.4",
|
|
35
|
+
"@webex/test-helper-test-users": "3.0.0-next.4",
|
|
36
36
|
"eslint": "^8.24.0",
|
|
37
37
|
"prettier": "^2.7.1",
|
|
38
38
|
"sinon": "^9.2.4"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@webex/common": "3.0.0-next.
|
|
42
|
-
"@webex/common-timers": "3.0.0-next.
|
|
43
|
-
"@webex/internal-plugin-device": "3.0.0-next.
|
|
44
|
-
"@webex/internal-plugin-feature": "3.0.0-next.
|
|
45
|
-
"@webex/internal-plugin-metrics": "3.0.0-next.
|
|
46
|
-
"@webex/test-helper-chai": "3.0.0-next.
|
|
47
|
-
"@webex/test-helper-mocha": "3.0.0-next.
|
|
48
|
-
"@webex/test-helper-mock-web-socket": "3.0.0-next.
|
|
49
|
-
"@webex/test-helper-mock-webex": "3.0.0-next.
|
|
50
|
-
"@webex/test-helper-refresh-callback": "3.0.0-next.
|
|
51
|
-
"@webex/test-helper-test-users": "3.0.0-next.
|
|
52
|
-
"@webex/webex-core": "3.0.0-next.
|
|
41
|
+
"@webex/common": "3.0.0-next.4",
|
|
42
|
+
"@webex/common-timers": "3.0.0-next.4",
|
|
43
|
+
"@webex/internal-plugin-device": "3.0.0-next.4",
|
|
44
|
+
"@webex/internal-plugin-feature": "3.0.0-next.5",
|
|
45
|
+
"@webex/internal-plugin-metrics": "3.0.0-next.4",
|
|
46
|
+
"@webex/test-helper-chai": "3.0.0-next.4",
|
|
47
|
+
"@webex/test-helper-mocha": "3.0.0-next.4",
|
|
48
|
+
"@webex/test-helper-mock-web-socket": "3.0.0-next.4",
|
|
49
|
+
"@webex/test-helper-mock-webex": "3.0.0-next.4",
|
|
50
|
+
"@webex/test-helper-refresh-callback": "3.0.0-next.4",
|
|
51
|
+
"@webex/test-helper-test-users": "3.0.0-next.4",
|
|
52
|
+
"@webex/webex-core": "3.0.0-next.4",
|
|
53
53
|
"backoff": "^2.5.0",
|
|
54
54
|
"lodash": "^4.17.21",
|
|
55
55
|
"uuid": "^3.3.2",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"test": "yarn test:style && yarn test:unit && yarn test:integration && yarn test:browser",
|
|
63
63
|
"test:browser": "webex-legacy-tools test --integration --unit --runner karma",
|
|
64
64
|
"test:style": "eslint ./src/**/*.*",
|
|
65
|
-
"test:unit": "webex-legacy-tools test --unit --runner
|
|
65
|
+
"test:unit": "webex-legacy-tools test --unit --runner mocha"
|
|
66
66
|
},
|
|
67
|
-
"version": "3.0.0-next.
|
|
67
|
+
"version": "3.0.0-next.5"
|
|
68
68
|
}
|
|
@@ -142,7 +142,7 @@ describe('plugin-mercury', () => {
|
|
|
142
142
|
});
|
|
143
143
|
});
|
|
144
144
|
|
|
145
|
-
describe
|
|
145
|
+
describe('when `mercury.buffer_state` is received', () => {
|
|
146
146
|
// This test is here because the buffer states message may arrive before
|
|
147
147
|
// the mercury Promise resolves.
|
|
148
148
|
it('gets emitted', (done) => {
|
|
@@ -381,7 +381,7 @@ describe('plugin-mercury', () => {
|
|
|
381
381
|
});
|
|
382
382
|
});
|
|
383
383
|
|
|
384
|
-
describe
|
|
384
|
+
describe('when webSocketUrl is provided', () => {
|
|
385
385
|
it('connects to Mercury with provided url', () => {
|
|
386
386
|
const webSocketUrl = 'ws://providedurl.com';
|
|
387
387
|
const promise = mercury.connect(webSocketUrl);
|
|
@@ -403,7 +403,7 @@ describe('plugin-mercury', () => {
|
|
|
403
403
|
});
|
|
404
404
|
});
|
|
405
405
|
|
|
406
|
-
describe
|
|
406
|
+
describe('Websocket proxy agent', () => {
|
|
407
407
|
afterEach(() => {
|
|
408
408
|
delete webex.config.defaultMercuryOptions;
|
|
409
409
|
});
|
|
@@ -451,7 +451,7 @@ describe('plugin-mercury', () => {
|
|
|
451
451
|
});
|
|
452
452
|
});
|
|
453
453
|
|
|
454
|
-
describe
|
|
454
|
+
describe('#disconnect()', () => {
|
|
455
455
|
it('disconnects the WebSocket', () =>
|
|
456
456
|
mercury
|
|
457
457
|
.connect()
|
package/test/unit/spec/socket.js
CHANGED
|
@@ -40,8 +40,10 @@ describe('plugin-mercury', () => {
|
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
beforeEach(() => {
|
|
43
|
-
sinon.stub(Socket, 'getWebSocketConstructor').callsFake(
|
|
44
|
-
|
|
43
|
+
sinon.stub(Socket, 'getWebSocketConstructor').callsFake(
|
|
44
|
+
() =>
|
|
45
|
+
function (...args) {
|
|
46
|
+
mockWebSocket = new MockWebSocket(...args);
|
|
45
47
|
|
|
46
48
|
return mockWebSocket;
|
|
47
49
|
}
|
|
@@ -69,7 +71,7 @@ describe('plugin-mercury', () => {
|
|
|
69
71
|
});
|
|
70
72
|
});
|
|
71
73
|
|
|
72
|
-
describe
|
|
74
|
+
describe('#open()', () => {
|
|
73
75
|
let socket;
|
|
74
76
|
|
|
75
77
|
beforeEach(() => {
|
|
@@ -213,7 +215,7 @@ describe('plugin-mercury', () => {
|
|
|
213
215
|
});
|
|
214
216
|
});
|
|
215
217
|
|
|
216
|
-
describe
|
|
218
|
+
describe('#open()', () => {
|
|
217
219
|
it('requires a url parameter', () => {
|
|
218
220
|
const s = new Socket();
|
|
219
221
|
|
|
@@ -566,7 +568,7 @@ describe('plugin-mercury', () => {
|
|
|
566
568
|
});
|
|
567
569
|
});
|
|
568
570
|
|
|
569
|
-
describe
|
|
571
|
+
describe('#onclose()', () => {
|
|
570
572
|
it('stops further ping checks', () => {
|
|
571
573
|
socket._ping.resetHistory();
|
|
572
574
|
assert.notCalled(socket._ping);
|
|
@@ -750,7 +752,7 @@ describe('plugin-mercury', () => {
|
|
|
750
752
|
});
|
|
751
753
|
});
|
|
752
754
|
|
|
753
|
-
describe
|
|
755
|
+
describe('#_ping()', () => {
|
|
754
756
|
let id;
|
|
755
757
|
|
|
756
758
|
beforeEach(() => {
|