Skip to content

Commit

Permalink
chore: styling
Browse files Browse the repository at this point in the history
  • Loading branch information
rcarriga committed Jul 2, 2022
1 parent c57dc67 commit 0ccb5c0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lua/neotest/consumers/run.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ local function get_tree_from_args(args, store)
end
if args[1] then
local position_id = lib.files.exists(args[1]) and async.fn.fnamemodify(args[1], ":p")
or args[1]
or args[1]
return client:get_position(position_id, args)
end
local file_path = async.fn.expand("%:p")
Expand Down
4 changes: 3 additions & 1 deletion lua/neotest/consumers/summary/component.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ function SummaryComponent:render(canvas, tree, expanded, focused, indent)
end
end
else
for _, pos in self.client:get_position(position.id, { adapter = self.adapter_id }):iter() do
for _, pos in
self.client:get_position(position.id, { adapter = self.adapter_id }):iter()
do
positions[pos.id] = true
end
end
Expand Down
7 changes: 4 additions & 3 deletions lua/neotest/consumers/summary/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,10 @@ local function init()
end
local expanded = {}
for pos_id, result in pairs(results) do
if result.status == "failed"
and client:get_position(pos_id, { refresh = false, adapter = adapter_id })
and #client:get_position(pos_id, { adapter = adapter_id }):children() > 0
if
result.status == "failed"
and client:get_position(pos_id, { refresh = false, adapter = adapter_id })
and #client:get_position(pos_id, { adapter = adapter_id }):children() > 0
then
expanded[pos_id] = true
end
Expand Down

0 comments on commit 0ccb5c0

Please sign in to comment.