1
1
local Cache = require (" neotest-busted.cache" )
2
+ local compat = require (" neotest-busted.compat" )
2
3
local config = require (" neotest-busted.config" )
3
4
local logging = require (" neotest-busted.logging" )
4
5
local util = require (" neotest-busted.util" )
@@ -181,11 +182,11 @@ function BustedNeotestAdapter.create_test_command(paths, options)
181
182
182
183
-- TODO: Should paths be quoted? Try seeing if a path with a space works
183
184
-- Append custom paths from config
184
- if vim .tbl_islist (config .busted_paths ) then
185
+ if compat .tbl_islist (config .busted_paths ) then
185
186
vim .list_extend (lua_paths , config .busted_paths )
186
187
end
187
188
188
- if vim .tbl_islist (config .busted_cpaths ) then
189
+ if compat .tbl_islist (config .busted_cpaths ) then
189
190
vim .list_extend (lua_cpaths , config .busted_cpaths )
190
191
end
191
192
@@ -234,15 +235,15 @@ function BustedNeotestAdapter.create_test_command(paths, options)
234
235
235
236
vim .list_extend (arguments , busted_command )
236
237
237
- if vim .tbl_islist (config .busted_args ) then
238
+ if compat .tbl_islist (config .busted_args ) then
238
239
for _ , busted_arg in ipairs (config .busted_args ) do
239
240
local arg = _options .quote_strings and quote_string (busted_arg ) or busted_arg
240
241
241
242
table.insert (arguments , arg )
242
243
end
243
244
end
244
245
245
- if vim .tbl_islist (_options .busted_arguments ) then
246
+ if compat .tbl_islist (_options .busted_arguments ) then
246
247
for _ , busted_arg in ipairs (_options .busted_arguments ) do
247
248
local arg = _options .quote_strings and quote_string (busted_arg ) or busted_arg
248
249
@@ -269,7 +270,8 @@ function BustedNeotestAdapter.create_test_command(paths, options)
269
270
end
270
271
271
272
return {
272
- nvim_command = vim .loop .exepath (),
273
+ --- @diagnostic disable-next-line : undefined-field
274
+ nvim_command = compat .loop .exepath (),
273
275
arguments = arguments ,
274
276
paths = lua_paths ,
275
277
cpaths = lua_cpaths ,
@@ -527,7 +529,7 @@ function BustedNeotestAdapter.build_spec(args)
527
529
local command = vim .list_extend ({ test_command .nvim_command }, test_command .arguments )
528
530
529
531
-- Extra arguments for busted
530
- if vim .tbl_islist (args .extra_args ) then
532
+ if compat .tbl_islist (args .extra_args ) then
531
533
vim .list_extend (command , args .extra_args )
532
534
end
533
535
0 commit comments