Skip to content

Commit

Permalink
fix(client): adapter dir check
Browse files Browse the repository at this point in the history
  • Loading branch information
Rónán Carrigan committed Jul 13, 2022
1 parent 6a35506 commit 703a297
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lua/neotest/client/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,12 @@ function NeotestClient:_get_adapter(position_id, adapter_id, refresh)
end
end
end
if not lib.files.is_dir(position_id) then
for _, adapter in ipairs(self._adapters) do
if self._state:positions(adapter.name, position_id) or adapter.is_test_file(position_id) then
return adapter.name, adapter
end
for _, adapter in ipairs(self._adapters) do
if
self._state:positions(adapter.name, position_id)
or (not lib.files.is_dir(position_id) and adapter.is_test_file(position_id))
then
return adapter.name, adapter
end
end

Expand Down

0 comments on commit 703a297

Please sign in to comment.