Skip to content

Commit

Permalink
special case for when logging jquery nodes -- print the html
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbintz committed Aug 11, 2011
1 parent dc5b8c0 commit 6a06d87
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/jasmine/template_writer.rb
Expand Up @@ -28,7 +28,11 @@ def template_for(files, spec_lines)
<title>Jasmine Test Runner</title>
<script type="text/javascript">
window.console = { log: function(data) {
JHW.log(JSON.stringify(data));
if (typeof(jQuery) !== 'undefined' && data instanceof jQuery) {
JHW.log($("<div />").append(data).html());
} else {
JHW.log(JSON.stringify(data));
}
}, pp: function(data) {
JHW.log(jasmine ? jasmine.pp(data) : JSON.stringify(data));
} };
Expand Down

0 comments on commit 6a06d87

Please sign in to comment.