Skip to content

Commit

Permalink
fix: error only when karma is navigating
Browse files Browse the repository at this point in the history
This commit fixes a bug whereby Karma mistakenly errors out when it is
*not* navigating. This is because the variable was flipped from
`reloadingContext` to `karmaNavigating` in karma-runner#3565, but the condition was
not negated.
  • Loading branch information
kyliau committed Nov 16, 2020
1 parent 05dc288 commit 117e40c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/karma.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function Karma (socket, iframe, opener, navigator, location, document) {
}

this.onbeforeunload = function () {
if (!karmaNavigating) {
if (karmaNavigating) {
// TODO(vojta): show what test (with explanation about jasmine.UPDATE_INTERVAL)
self.error('Some of your tests did a full page reload!')
}
Expand Down
2 changes: 1 addition & 1 deletion static/karma.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function Karma (socket, iframe, opener, navigator, location, document) {
}

this.onbeforeunload = function () {
if (!karmaNavigating) {
if (karmaNavigating) {
// TODO(vojta): show what test (with explanation about jasmine.UPDATE_INTERVAL)
self.error('Some of your tests did a full page reload!')
}
Expand Down

0 comments on commit 117e40c

Please sign in to comment.