From 26bc0ba78a1f451aa5bfc87896906321ba6c8a43 Mon Sep 17 00:00:00 2001 From: Brian Leighty Date: Fri, 22 Mar 2024 08:38:48 -0400 Subject: [PATCH] PR feedback --- client/package.json | 1 + client/src/ECP.ts | 7 ++++++- client/src/NetworkProxy.ts | 7 ++++++- client/src/OnDeviceComponent.ts | 7 ++++++- client/src/RokuDevice.ts | 7 ++++++- client/src/utils.ts | 4 ++-- device/components/RTA_OnDeviceComponentTask.brs | 2 +- 7 files changed, 28 insertions(+), 7 deletions(-) diff --git a/client/package.json b/client/package.json index b0c7dcd..54f8606 100644 --- a/client/package.json +++ b/client/package.json @@ -91,6 +91,7 @@ }, "mocha": { "timeout": 72000, + "bail": true, "require": [ "source-map-support/register" ], diff --git a/client/src/ECP.ts b/client/src/ECP.ts index 1896967..76cddef 100644 --- a/client/src/ECP.ts +++ b/client/src/ECP.ts @@ -51,7 +51,9 @@ export class ECP { this.device.setConfig(config); } - /** Provides a way to get the whole config not just this classes' Config */ + /** + * Get the full RTA config + */ public getRtaConfig() { if (!this.config) { this.config = utils.getConfigFromEnvironmentOrConfigFile(); @@ -59,6 +61,9 @@ export class ECP { return this.config; } + /** + * Get the ECP config from the full RTA config. + */ public getConfig() { return this.getRtaConfig()?.ECP; } diff --git a/client/src/NetworkProxy.ts b/client/src/NetworkProxy.ts index 6bbd71e..602c425 100644 --- a/client/src/NetworkProxy.ts +++ b/client/src/NetworkProxy.ts @@ -20,7 +20,9 @@ export class NetworkProxy { this.config = config; } - /** Provides a way to get the whole config not just this classes' Config */ + /** + * Get the full RTA config + */ public getRtaConfig() { if (!this.config) { this.config = utils.getConfigFromEnvironmentOrConfigFile(); @@ -28,6 +30,9 @@ export class NetworkProxy { return this.config; } + /** + * Get the NetworkProxy config from the full RTA config. + */ public getConfig() { return this.getRtaConfig()?.NetworkProxy; } diff --git a/client/src/OnDeviceComponent.ts b/client/src/OnDeviceComponent.ts index 8e9eb7a..54d8d03 100644 --- a/client/src/OnDeviceComponent.ts +++ b/client/src/OnDeviceComponent.ts @@ -32,7 +32,9 @@ export class OnDeviceComponent { this.device.setConfig(config); } - /** Provides a way to get the whole config not just this classes' Config */ + /** + * Get the full RTA config + */ public getRtaConfig() { if (!this.config) { this.config = utils.getConfigFromEnvironmentOrConfigFile(); @@ -40,6 +42,9 @@ export class OnDeviceComponent { return this.config; } + /** + * Get the OnDeviceComponent config from the full RTA config. + */ public getConfig() { return this.getRtaConfig()?.OnDeviceComponent; } diff --git a/client/src/RokuDevice.ts b/client/src/RokuDevice.ts index cd73e5a..03db4f5 100644 --- a/client/src/RokuDevice.ts +++ b/client/src/RokuDevice.ts @@ -30,7 +30,9 @@ export class RokuDevice { this.config = config; } - /** Provides a way to get the whole config not just this classes' Config */ + /** + * Get the full RTA config + */ public getRtaConfig() { if (!this.config) { this.config = utils.getConfigFromEnvironmentOrConfigFile(); @@ -38,6 +40,9 @@ export class RokuDevice { return this.config; } + /** + * Get the RokuDevice config from the full RTA config. + */ public getConfig() { return this.getRtaConfig()?.RokuDevice; } diff --git a/client/src/utils.ts b/client/src/utils.ts index 092d6e2..a4bab3f 100644 --- a/client/src/utils.ts +++ b/client/src/utils.ts @@ -200,7 +200,7 @@ class Utils { return error; } - public getTestTitlePath(contextOrSuite: Mocha.Context | Mocha.Suite, sterilize = true) { + public getTestTitlePath(contextOrSuite: Mocha.Context | Mocha.Suite, sanitize = true) { let ctx: Mocha.Context; if (contextOrSuite.constructor.name === 'Context') { ctx = contextOrSuite as Mocha.Context; @@ -215,7 +215,7 @@ class Utils { } const pathParts = ctx.currentTest?.titlePath(); - if (sterilize) { + if (sanitize) { for (const [index, pathPart] of pathParts.entries()) { pathParts[index] = filenamify(pathPart); } diff --git a/device/components/RTA_OnDeviceComponentTask.brs b/device/components/RTA_OnDeviceComponentTask.brs index 8460828..09cae6a 100644 --- a/device/components/RTA_OnDeviceComponentTask.brs +++ b/device/components/RTA_OnDeviceComponentTask.brs @@ -99,7 +99,7 @@ sub handleSocketEvent(message as Object) end if end if else - ' We are switching from recursive code to letting us receive another roSocketEvent where we can handle the different parts of the request + ' We are relying on the fact that we will continue to get a roSocketEvent until the buffer is empty instead of recursive code to handle receiving the data handleClientSocketEvent(messageSocketId) end if end sub