Skip to content

Commit aa8dbc0

Browse files
committed
new Mocha needs suiteURL function from original reporter
1 parent 096a23f commit aa8dbc0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/_patch/mocha-plugin.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@
2020
return test.fullTitle().replace(/#/g, '');
2121
}
2222

23-
return Mocha.BrowserStack = function(runner, root) {
24-
Mocha.reporters.HTML.call(this, runner, root);
23+
var origReporter = mocha._reporter;
24+
25+
Mocha.BrowserStack = function(runner, root) {
26+
origReporter.apply(this, arguments);
2527

2628
var count = 1,
2729
that = this,
@@ -61,4 +63,8 @@
6163
BrowserStack.post("/_report", results, function(){});
6264
});
6365
};
66+
67+
Mocha.BrowserStack.prototype = origReporter.prototype;
68+
69+
return Mocha.BrowserStack;
6470
})();

0 commit comments

Comments
 (0)