Skip to content

armgit / mocha

Public Imported from GitHub
0

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

fix tail.js to not rely on "this"

TJ Holowaychuk76eefee57b28
diff --git a/support/tail.js b/support/tail.js
index 9a359ef3..0f600504 100644
--- a/support/tail.js
+++ b/support/tail.js
@@ -100,10 +100,10 @@ process.on = function(e, fn){
options.globals = options.globals || [];
options.globals.push('location');
- var query = Mocha.utils.parseQuery(window.location.search || "");
- if (query.grep) this.grep(query.grep);
+ var query = Mocha.utils.parseQuery(window.location.search || '');
+ if (query.grep) mocha.grep(query.grep);
- return Mocha.prototype.run.call(this, function () {
+ return Mocha.prototype.run.call(mocha, function(){
Mocha.utils.highlightTags('code');
if (fn) fn();
});