@neurodevs/node-lsl 10.2.0 → 10.2.1
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.
|
@@ -4,6 +4,7 @@ import { LslSample } from '../nodeLsl.types';
|
|
|
4
4
|
export default class FakeLslOutlet implements LslOutlet {
|
|
5
5
|
static constructorInfo?: StreamInfo;
|
|
6
6
|
static constructorOptions?: LslOutletOptions;
|
|
7
|
+
static callsToConstructor: CallToConstructor[];
|
|
7
8
|
static callsToPushSample: LslSample[];
|
|
8
9
|
static numCallsToDestroy: number;
|
|
9
10
|
constructor(info: StreamInfo, options: LslOutletOptions);
|
|
@@ -11,3 +12,7 @@ export default class FakeLslOutlet implements LslOutlet {
|
|
|
11
12
|
pushSample(sample: LslSample): void;
|
|
12
13
|
static resetTestDouble(): void;
|
|
13
14
|
}
|
|
15
|
+
export interface CallToConstructor {
|
|
16
|
+
info: StreamInfo;
|
|
17
|
+
options: LslOutletOptions;
|
|
18
|
+
}
|
|
@@ -4,6 +4,7 @@ class FakeLslOutlet {
|
|
|
4
4
|
constructor(info, options) {
|
|
5
5
|
FakeLslOutlet.constructorInfo = info;
|
|
6
6
|
FakeLslOutlet.constructorOptions = options;
|
|
7
|
+
FakeLslOutlet.callsToConstructor.push({ info, options });
|
|
7
8
|
}
|
|
8
9
|
destroy() {
|
|
9
10
|
FakeLslOutlet.numCallsToDestroy++;
|
|
@@ -12,11 +13,14 @@ class FakeLslOutlet {
|
|
|
12
13
|
FakeLslOutlet.callsToPushSample.push(sample);
|
|
13
14
|
}
|
|
14
15
|
static resetTestDouble() {
|
|
16
|
+
FakeLslOutlet.constructorInfo = undefined;
|
|
15
17
|
FakeLslOutlet.constructorOptions = undefined;
|
|
18
|
+
FakeLslOutlet.callsToConstructor = [];
|
|
16
19
|
FakeLslOutlet.callsToPushSample = [];
|
|
17
20
|
FakeLslOutlet.numCallsToDestroy = 0;
|
|
18
21
|
}
|
|
19
22
|
}
|
|
23
|
+
FakeLslOutlet.callsToConstructor = [];
|
|
20
24
|
FakeLslOutlet.callsToPushSample = [];
|
|
21
25
|
FakeLslOutlet.numCallsToDestroy = 0;
|
|
22
26
|
exports.default = FakeLslOutlet;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FakeLslOutlet.js","sourceRoot":"","sources":["../../src/testDoubles/FakeLslOutlet.ts"],"names":[],"mappings":";;AAIA,MAAqB,aAAa;
|
|
1
|
+
{"version":3,"file":"FakeLslOutlet.js","sourceRoot":"","sources":["../../src/testDoubles/FakeLslOutlet.ts"],"names":[],"mappings":";;AAIA,MAAqB,aAAa;IAO9B,YAAmB,IAAgB,EAAE,OAAyB;QAC1D,aAAa,CAAC,eAAe,GAAG,IAAI,CAAA;QACpC,aAAa,CAAC,kBAAkB,GAAG,OAAO,CAAA;QAC1C,aAAa,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAA;IAC5D,CAAC;IAEM,OAAO;QACV,aAAa,CAAC,iBAAiB,EAAE,CAAA;IACrC,CAAC;IAEM,UAAU,CAAC,MAAiB;QAC/B,aAAa,CAAC,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAChD,CAAC;IAEM,MAAM,CAAC,eAAe;QACzB,aAAa,CAAC,eAAe,GAAG,SAAS,CAAA;QACzC,aAAa,CAAC,kBAAkB,GAAG,SAAS,CAAA;QAC5C,aAAa,CAAC,kBAAkB,GAAG,EAAE,CAAA;QACrC,aAAa,CAAC,iBAAiB,GAAG,EAAE,CAAA;QACpC,aAAa,CAAC,iBAAiB,GAAG,CAAC,CAAA;IACvC,CAAC;;AAxBa,gCAAkB,GAAwB,EAAE,CAAA;AAC5C,+BAAiB,GAAgB,EAAE,CAAA;AACnC,+BAAiB,GAAG,CAAC,CAAA;kBALlB,aAAa"}
|
package/package.json
CHANGED
|
@@ -5,12 +5,14 @@ import { LslSample } from '../nodeLsl.types'
|
|
|
5
5
|
export default class FakeLslOutlet implements LslOutlet {
|
|
6
6
|
public static constructorInfo?: StreamInfo
|
|
7
7
|
public static constructorOptions?: LslOutletOptions
|
|
8
|
+
public static callsToConstructor: CallToConstructor[] = []
|
|
8
9
|
public static callsToPushSample: LslSample[] = []
|
|
9
10
|
public static numCallsToDestroy = 0
|
|
10
11
|
|
|
11
12
|
public constructor(info: StreamInfo, options: LslOutletOptions) {
|
|
12
13
|
FakeLslOutlet.constructorInfo = info
|
|
13
14
|
FakeLslOutlet.constructorOptions = options
|
|
15
|
+
FakeLslOutlet.callsToConstructor.push({ info, options })
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
public destroy() {
|
|
@@ -22,8 +24,15 @@ export default class FakeLslOutlet implements LslOutlet {
|
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
public static resetTestDouble() {
|
|
27
|
+
FakeLslOutlet.constructorInfo = undefined
|
|
25
28
|
FakeLslOutlet.constructorOptions = undefined
|
|
29
|
+
FakeLslOutlet.callsToConstructor = []
|
|
26
30
|
FakeLslOutlet.callsToPushSample = []
|
|
27
31
|
FakeLslOutlet.numCallsToDestroy = 0
|
|
28
32
|
}
|
|
29
33
|
}
|
|
34
|
+
|
|
35
|
+
export interface CallToConstructor {
|
|
36
|
+
info: StreamInfo
|
|
37
|
+
options: LslOutletOptions
|
|
38
|
+
}
|