Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

Fix linter warning "Expected a conditional expression and instead saw an assignment"

Daniel St. Jules8a100df9598c
diff --git a/lib/runner.js b/lib/runner.js
index c648a364..39571316 100644
--- a/lib/runner.js
+++ b/lib/runner.js
@@ -386,7 +386,8 @@ Runner.prototype.hookDown = function(name, fn) {
Runner.prototype.parents = function() {
var suite = this.suite;
var suites = [];
- while (suite = suite.parent) {
+ while (suite.parent) {
+ suite = suite.parent;
suites.push(suite);
}
return suites;