Skip to content

Commit

Permalink
Show serialized form in test output
Browse files Browse the repository at this point in the history
  • Loading branch information
Anand Thakker committed Apr 6, 2018
1 parent a3d08bb commit f9150b1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions test/integration/expression-tests/result_item.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
</td>
<td>
<h2 style="text-align:center; background:<%- r.color %>"><a href="<%- r.group %>/case.json">&nbsp;</a></h2>
<div style="max-width: 400px; overflow: scroll; font-family: monospace;">
<div>
<% if (r.serialized) { %>
Serialized:
<pre>
<%- r.compiledJs %>
<%- r.serialized %>
</pre>
<% } %>
</div>
</td>
</tr>
3 changes: 2 additions & 1 deletion test/integration/lib/expression.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ exports.run = function (implementation, options, runExpressionTest) {
params.difference = diffOutput.html;
if (diffOutput.text) { console.log(diffOutput.text); }

params.expression = JSON.stringify(fixture.expression, null, 2);
params.expression = compactStringify(fixture.expression);
params.serialized = compactStringify(result.serialized);

done();
} catch (e) {
Expand Down

0 comments on commit f9150b1

Please sign in to comment.