Skip to content

Commit

Permalink
rename and fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKamaev committed Sep 11, 2018
1 parent a7a45c9 commit 2612bdd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions src/browser/connection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default class BrowserConnection extends EventEmitter {
this.jobQueue = [];
this.initScriptsQueue = [];
this.browserConnectionGateway = gateway;
this.errorSupressed = false;
this.errorSuppressed = false;
this.testRunAborted = false;

this.browserInfo = browserInfo;
Expand Down Expand Up @@ -120,13 +120,13 @@ export default class BrowserConnection extends EventEmitter {
this.heartbeatTimeout = setTimeout(() => {
const err = this._createBrowserDisconnectedError();

this.opened = false;
this.errorSupressed = false;
this.testRunAborted = true;
this.opened = false;
this.errorSuppressed = false;
this.testRunAborted = true;

this.emit('disconnected', err);

if (!this.errorSupressed)
if (!this.errorSuppressed)
this.emit('error', err);

}, this.HEARTBEAT_TIMEOUT);
Expand Down Expand Up @@ -155,9 +155,9 @@ export default class BrowserConnection extends EventEmitter {

this._forceIdle();

let resolveTimeout = null;
let onTimeout = false;
let timeout = null;
let resolveTimeout = null;
let isTimeoutExpired = false;
let timeout = null;

const restartPromise = this._closeBrowser()
.then(() => this._runBrowser());
Expand All @@ -166,7 +166,7 @@ export default class BrowserConnection extends EventEmitter {
resolveTimeout = resolve;

timeout = setTimeout(() => {
onTimeout = true;
isTimeoutExpired = true;

resolve();
}, this.BROWSER_RESTART_TIMEOUT);
Expand All @@ -176,15 +176,15 @@ export default class BrowserConnection extends EventEmitter {
.then(() => {
clearTimeout(timeout);

if (onTimeout)
if (isTimeoutExpired)
this.emit('error', this._createBrowserDisconnectedError());
else
resolveTimeout();
});
}

supressError () {
this.errorSupressed = true;
suppressError () {
this.errorSuppressed = true;
}

addWarning (...args) {
Expand Down
2 changes: 1 addition & 1 deletion src/runner/test-run-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export default class TestRunController extends EventEmitter {
this.disconnectionCount++;

if (this.disconnectionCount < DISCONNECT_THRESHOLD) {
connection.supressError();
connection.suppressError();

await connection.restartBrowser();

Expand Down

0 comments on commit 2612bdd

Please sign in to comment.