Skip to content

Commit

Permalink
update typing, add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
rileyajones committed May 7, 2021
1 parent 5e8320a commit 621556c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion build-system/tasks/runtime-test/runtime-test-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,12 @@ let wrapCounter = 0;
*/
let transform;

/**
* Consumes {@link karmaConfig} and dynamically populates fields based on test
* type and command line arguments.
*/
class RuntimeTestConfig {
/** @type {Array<string|[]>} */
/** @type {Array<string|Record<string, [string, *]>>} */
plugins = [];

/**@type {Record<string, string|string[]>} */
Expand All @@ -70,6 +74,11 @@ class RuntimeTestConfig {
*/
constructor(testType) {
this.testType = testType;
/**
* TypeScript is used for typechecking here and is unable to infer the type
* after using Object.assign. This results in errors relating properties of
* which can never be `null` being treated as though they could be.
*/
Object.assign(this, karmaConfig);
this.updateBrowsers();
this.updateReporters();
Expand Down

0 comments on commit 621556c

Please sign in to comment.