@opentap/runner-client 2.19.0-alpha.1.8 → 2.19.0-alpha.1.9

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.
@@ -23,7 +23,12 @@ export declare class SessionClient extends BaseClient {
23
23
  * @returns Subscription array: Result and Test Run subscriptions
24
24
  */
25
25
  connectSessionResults(resultHandler: (result: Result | undefined, err: NatsError | Error | null) => void, testRunHandler: (testRun: TestRun | undefined, err: NatsError | Error | null) => void, options?: SubscriptionOptions): [Subscription, Subscription];
26
- connectTestStepRunStartedEvents(resultHandler: (result: Result | undefined, err: NatsError | Error | null) => void, testRunHandler: (testRun: TestRun | undefined, err: NatsError | Error | null) => void, options?: SubscriptionOptions): [Subscription, Subscription];
26
+ /**
27
+ * @param testRunHandler Function to be called when test run or error is received
28
+ * @param options (optional) Subscription options
29
+ * @returns Subscription array: Result and Test Run subscriptions
30
+ */
31
+ connectTestRunEvents(testRunHandler: (testRun: TestRun | undefined, err: NatsError | Error | null) => void, options?: SubscriptionOptions): Subscription;
27
32
  /**
28
33
  * Connect to listen to the TestPlanRun events for the given test plan run ID.
29
34
  * @param {string} testPlanRunId
@@ -120,39 +120,27 @@ var SessionClient = /** @class */ (function (_super) {
120
120
  } })),
121
121
  ];
122
122
  };
123
- SessionClient.prototype.connectTestStepRunStartedEvents = function (resultHandler, testRunHandler, options) {
124
- return [
125
- this.subscribe('OnResult', __assign(__assign({}, options), { callback: function (error, encodedMessage) {
126
- if (error) {
127
- resultHandler(undefined, error);
128
- return;
129
- }
130
- try {
131
- var jsonCodec = JSONCodec();
132
- var resultJs = jsonCodec.decode(encodedMessage === null || encodedMessage === void 0 ? void 0 : encodedMessage.data);
133
- var result = Result.fromJS(resultJs);
134
- resultHandler(result, error);
135
- }
136
- catch (error) {
137
- resultHandler(undefined, error);
138
- }
139
- } })),
140
- this.subscribe('OnTestRun', __assign(__assign({}, options), { callback: function (error, encodedMessage) {
141
- if (error) {
142
- testRunHandler(undefined, error);
143
- return;
144
- }
145
- try {
146
- var jsonCodec = JSONCodec();
147
- var testRunJs = jsonCodec.decode(encodedMessage === null || encodedMessage === void 0 ? void 0 : encodedMessage.data);
148
- var testRun = TestRun.fromJS(testRunJs);
149
- testRunHandler(testRun, error);
150
- }
151
- catch (error) {
152
- testRunHandler(undefined, error);
153
- }
154
- } })),
155
- ];
123
+ /**
124
+ * @param testRunHandler Function to be called when test run or error is received
125
+ * @param options (optional) Subscription options
126
+ * @returns Subscription array: Result and Test Run subscriptions
127
+ */
128
+ SessionClient.prototype.connectTestRunEvents = function (testRunHandler, options) {
129
+ return this.subscribe('OnTestRun', __assign(__assign({}, options), { callback: function (error, encodedMessage) {
130
+ if (error) {
131
+ testRunHandler(undefined, error);
132
+ return;
133
+ }
134
+ try {
135
+ var jsonCodec = JSONCodec();
136
+ var testRunJs = jsonCodec.decode(encodedMessage === null || encodedMessage === void 0 ? void 0 : encodedMessage.data);
137
+ var testRun = TestRun.fromJS(testRunJs);
138
+ testRunHandler(testRun, error);
139
+ }
140
+ catch (error) {
141
+ testRunHandler(undefined, error);
142
+ }
143
+ } }));
156
144
  };
157
145
  /**
158
146
  * Connect to listen to the TestPlanRun events for the given test plan run ID.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentap/runner-client",
3
- "version": "2.19.0-alpha.1.8",
3
+ "version": "2.19.0-alpha.1.9",
4
4
  "description": "This is the web client for the OpenTAP Runner.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",