Skip to content

Commit

Permalink
convert null checks into attribute declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
rileyajones committed May 5, 2021
1 parent 2b36ebb commit adda7f0
Show file tree
Hide file tree
Showing 4 changed files with 603 additions and 199 deletions.
27 changes: 12 additions & 15 deletions build-system/tasks/runtime-test/runtime-test-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,28 +53,24 @@ let wrapCounter = 0;
*/
let transform;

/**
* @extends {karmaConfig}
*/
class RuntimeTestConfig {
/** @type {Array<string|[]>} */
plugins = [];

/**@type {Record<string, string|string[]>} */
preprocessors = {};

/** @type {string[]} */
reporters = [];

client = {};

/**
* @param {string} testType
*/
constructor(testType) {
this.testType = testType;
Object.assign(this, karmaConfig);
if (!this.plugins) {
this.plugins = [];
}
if (!this.preprocessors) {
this.preprocessors = [];
}
if (!this.reporters) {
this.reporters = [];
}
if (!this.client) {
this.client = {};
}
this.updateBrowsers();
this.updateReporters();
this.updateFiles();
Expand All @@ -84,6 +80,7 @@ class RuntimeTestConfig {
this.updateMiddleware();
this.updateCoverageSettings();
}

/**
* Updates the set of preprocessors to run on HTML and JS files before testing.
* Notes:
Expand Down
3 changes: 0 additions & 3 deletions build-system/test-configs/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ if (argv.debug) {
COMMON_CHROME_FLAGS.push('--auto-open-devtools-for-tabs');
}

/**
* @param {!Object} config
*/
module.exports = {
frameworks: ['fixture', 'mocha', 'source-map-support'],

Expand Down
Loading

0 comments on commit adda7f0

Please sign in to comment.