refactor(testutils): remove unnecessary code
This commit is contained in:
parent
31f0b9d39c
commit
4b0fd060f9
1 changed files with 2 additions and 8 deletions
|
|
@ -31,18 +31,12 @@ function testutils.writefile(fpath, contents)
|
|||
vim.fn.writefile(vim.split(contents, "\n"), fpath)
|
||||
end
|
||||
|
||||
---@param path string
|
||||
---@return string
|
||||
function testutils.readfile_from_fixture_dir(path)
|
||||
return testutils.readfile(fixtures_dir .. path)
|
||||
end
|
||||
|
||||
---@param fixture string
|
||||
---@return {input: string, output: string}
|
||||
function testutils.get_fixtures(fixture)
|
||||
return {
|
||||
input = testutils.readfile_from_fixture_dir(fixture .. "_input.go"),
|
||||
output = testutils.readfile_from_fixture_dir(fixture .. "_output.go"),
|
||||
input = testutils.readfile(fixtures_dir .. fixture .. "_input.go"),
|
||||
output = testutils.readfile(fixtures_dir .. fixture .. "_output.go"),
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue