Skip to content

armgit / mocha

Public Imported from GitHub
0

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

Fix HTML runner to use the #mocha element as root. (close #1162)

Travis Jeffery84ced4c1b073
diff --git a/lib/reporters/html.js b/lib/reporters/html.js
index 873f024d..8b44e3ed 100644
--- a/lib/reporters/html.js
+++ b/lib/reporters/html.js
@@ -42,7 +42,7 @@ var statsTemplate = '<ul id="mocha-stats">'
* @api public
*/
-function HTML(runner, root) {
+function HTML(runner) {
Base.call(this, runner);
var self = this
@@ -60,8 +60,7 @@ function HTML(runner, root) {
, stack = [report]
, progress
, ctx
-
- root = root || document.getElementById('mocha');
+ , root = document.getElementById('mocha');
if (canvas.getContext) {
var ratio = window.devicePixelRatio || 1;
diff --git a/mocha.js b/mocha.js
index 6c3d51ce..9c85199f 100644
--- a/mocha.js
+++ b/mocha.js
@@ -2587,7 +2587,7 @@ var statsTemplate = '<ul id="mocha-stats">'
* @api public
*/
-function HTML(runner, root) {
+function HTML(runner) {
Base.call(this, runner);
var self = this
@@ -2605,8 +2605,7 @@ function HTML(runner, root) {
, stack = [report]
, progress
, ctx
-
- root = root || document.getElementById('mocha');
+ , root = document.getElementById('mocha');
if (canvas.getContext) {
var ratio = window.devicePixelRatio || 1;