Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
triwav committed Mar 22, 2024
1 parent 81158f7 commit 26bc0ba
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 7 deletions.
1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
},
"mocha": {
"timeout": 72000,
"bail": true,
"require": [
"source-map-support/register"
],
Expand Down
7 changes: 6 additions & 1 deletion client/src/ECP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,19 @@ 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();
}
return this.config;
}

/**
* Get the ECP config from the full RTA config.
*/
public getConfig() {
return this.getRtaConfig()?.ECP;
}
Expand Down
7 changes: 6 additions & 1 deletion client/src/NetworkProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,19 @@ 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();
}
return this.config;
}

/**
* Get the NetworkProxy config from the full RTA config.
*/
public getConfig() {
return this.getRtaConfig()?.NetworkProxy;
}
Expand Down
7 changes: 6 additions & 1 deletion client/src/OnDeviceComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,19 @@ 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();
}
return this.config;
}

/**
* Get the OnDeviceComponent config from the full RTA config.
*/
public getConfig() {
return this.getRtaConfig()?.OnDeviceComponent;
}
Expand Down
7 changes: 6 additions & 1 deletion client/src/RokuDevice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,19 @@ 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();
}
return this.config;
}

/**
* Get the RokuDevice config from the full RTA config.
*/
public getConfig() {
return this.getRtaConfig()?.RokuDevice;
}
Expand Down
4 changes: 2 additions & 2 deletions client/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion device/components/RTA_OnDeviceComponentTask.brs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 26bc0ba

Please sign in to comment.