visionmedia/mocha — pull request #555 by joliss (2012-08-24 21:17:37+00:00)
Title: Make Mocha runnable in an iframe

For Konacha, we'd love to be able to run Mocha inside an iframe, and
have the report rendered in the top-level frame. Here is an
illustration:

http://i.imgur.com/qD8em.png

I actually have this working in my Konacha working copy, and it's really
cool and useful, but it needs just a little help from Mocha's side to
work. This commit makes two small changes:

* Make the root element for the HTML reporter parameterizable. (The
default is still #mocha.)
* Do not repeat the current path in the ?grep URLs. It's redundant, and
it messes up the path with an iframe setup like we're trying to do.

There are no functional changes on Mocha's end.

-----------------------------

Please merge this? It'd be super-awesome!