fix: lint warning and test mocks for async file read
Problem: selene flagged unused err3 variable, and test mock_enums still mocked io.open instead of the new vim.uv.fs_* calls. Solution: rename err3 to _, replace io.open mock with synchronous vim.uv.fs_open/fs_fstat/fs_read/fs_close mocks using a sentinel fd.
This commit is contained in:
parent
71d5505fb8
commit
3776133815
2 changed files with 35 additions and 13 deletions
|
|
@ -193,7 +193,7 @@ function M:get_completions(ctx, callback)
|
|||
on_all_done()
|
||||
return
|
||||
end
|
||||
vim.uv.fs_read(fd, stat.size, 0, function(err3, data)
|
||||
vim.uv.fs_read(fd, stat.size, 0, function(_, data)
|
||||
vim.uv.fs_close(fd)
|
||||
enums_content = data or ''
|
||||
on_all_done()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue