Skip to content

Commit

Permalink
Render reports with exceptions and expected better
Browse files Browse the repository at this point in the history
Currently if a report contains an exception then the left-hand-side diff
panel is hidden and only the exception is rendered.

This change first checks if there is also an `expected` side to the
report and if so will continue to render it.
  • Loading branch information
julienvincent committed Aug 29, 2024
1 parent a681ddf commit 6a45440
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lua/clojure-test/ui/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ local function handle_on_move(UI, event)
if node.assertion then
if node.assertion.exceptions then
vim.schedule(function()
if node.assertion.expected then
layout:render_double()
write_clojure_to_buf(layout.windows.left.bufnr, node.assertion.expected)
exceptions.render_exceptions_to_buf(layout.windows.right.bufnr, node.assertion.exceptions)
return
end

layout:render_single()
exceptions.render_exceptions_to_buf(layout.windows.right.bufnr, node.assertion.exceptions)
end)
Expand Down

0 comments on commit 6a45440

Please sign in to comment.