Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: restarted browsers not running tests #3233

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! test: add unit test that covers disconnected restarted browsers
Address feedback
  • Loading branch information
devversion committed Dec 14, 2018
commit 4a1b33f153d8b3a7a2d8564ef83bb9830f82c7de
6 changes: 5 additions & 1 deletion client/karma.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ var util = require('../common/util')
function Karma (socket, iframe, opener, navigator, location) {
var startEmitted = false
var reloadingContext = false
var socketReconnect = false
var self = this
var queryParams = util.parseQueryParams(location.search)
var browserId = queryParams.id || util.generateId('manual-')
Expand All @@ -15,6 +14,11 @@ function Karma (socket, iframe, opener, navigator, location) {
var resultsBufferLimit = 50
var resultsBuffer = []

// This variable will be set to "true" whenever the socket lost connection and was able to
// reconnect to the Karma server. This will be passed to the Karma server then, so that
// Karma can differentiate between a socket client reconnect and a full browser reconnect.
var socketReconnect = false

this.VERSION = constant.VERSION
this.config = {}

Expand Down