Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Mocha runnable in an iframe #555

Merged
merged 1 commit into from
Aug 24, 2012

Conversation

joliss
Copy link
Contributor

@joliss joliss commented Aug 24, 2012

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!

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.
@travisbot
Copy link

This pull request passes (merged 40b4f7b into 5b43314).

tj added a commit that referenced this pull request Aug 24, 2012
@tj tj merged commit 44d50fd into mochajs:master Aug 24, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants