refactor(testutils): remove unnecessary code

This commit is contained in:
Oleksandr Smirnov 2025-02-24 13:22:41 +02:00
parent 31f0b9d39c
commit 4b0fd060f9
No known key found for this signature in database

View file

@ -31,18 +31,12 @@ function testutils.writefile(fpath, contents)
vim.fn.writefile(vim.split(contents, "\n"), fpath) vim.fn.writefile(vim.split(contents, "\n"), fpath)
end end
---@param path string
---@return string
function testutils.readfile_from_fixture_dir(path)
return testutils.readfile(fixtures_dir .. path)
end
---@param fixture string ---@param fixture string
---@return {input: string, output: string} ---@return {input: string, output: string}
function testutils.get_fixtures(fixture) function testutils.get_fixtures(fixture)
return { return {
input = testutils.readfile_from_fixture_dir(fixture .. "_input.go"), input = testutils.readfile(fixtures_dir .. fixture .. "_input.go"),
output = testutils.readfile_from_fixture_dir(fixture .. "_output.go"), output = testutils.readfile(fixtures_dir .. fixture .. "_output.go"),
} }
end end