@schukai/monster 3.1.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -16,14 +16,14 @@ export {WebSocketDatasource}
|
|
16
16
|
|
17
17
|
/**
|
18
18
|
* @private
|
19
|
-
* @type {
|
19
|
+
* @type {Symbol}
|
20
20
|
*/
|
21
21
|
const receiveQueueSymbol = Symbol("queue");
|
22
22
|
|
23
23
|
|
24
24
|
/**
|
25
25
|
* @private
|
26
|
-
* @type {
|
26
|
+
* @type {Symbol}
|
27
27
|
*
|
28
28
|
* hint: this name is used in the tests. if you want to change it, please change it in the tests as well.
|
29
29
|
*/
|
@@ -330,7 +330,7 @@ class WebSocketDatasource extends Datasource {
|
|
330
330
|
*/
|
331
331
|
getClone() {
|
332
332
|
const self = this;
|
333
|
-
return new
|
333
|
+
return new WebSocketDatasource(self[internalSymbol].getRealSubject()['options']);
|
334
334
|
}
|
335
335
|
|
336
336
|
}
|
package/source/types/version.mjs
CHANGED
@@ -37,6 +37,16 @@ describe('Websocket', function () {
|
|
37
37
|
done()
|
38
38
|
});
|
39
39
|
|
40
|
+
it('should get clone', function () {
|
41
|
+
|
42
|
+
ds = new WebSocketDatasource(testUrl)
|
43
|
+
const clone = ds.getClone()
|
44
|
+
|
45
|
+
expect(clone).to.be.an.instanceof(WebSocketDatasource)
|
46
|
+
|
47
|
+
|
48
|
+
})
|
49
|
+
|
40
50
|
it('should connect', function (done) {
|
41
51
|
ds = new WebSocketDatasource({
|
42
52
|
url: testUrl,
|
package/test/cases/monster.mjs
CHANGED