Skip to content

Commit

Permalink
Fix HTML runner to use the #mocha element as root. (close #1162)
Browse files Browse the repository at this point in the history
  • Loading branch information
travisjeffery committed Mar 18, 2014
1 parent 577199e commit 84ced4c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions lib/reporters/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down

0 comments on commit 84ced4c

Please sign in to comment.