fix(tests): some how i now i need to run vim.treesitter.start() to make it work
This commit is contained in:
parent
47bdebe67d
commit
867d57cfbc
3 changed files with 9 additions and 2 deletions
|
|
@ -69,6 +69,7 @@ end
|
|||
---@class gopher.TestUtilsSetup
|
||||
---@field tmp string
|
||||
---@field fixtures gopher.TestUtilsFixtures
|
||||
---@field bufnr number
|
||||
|
||||
---@param fixture string
|
||||
---@param child MiniTest.child
|
||||
|
|
@ -80,13 +81,16 @@ function testutils.setup_test(fixture, child, pos)
|
|||
|
||||
testutils.writefile(tmp, fixtures.input)
|
||||
child.cmd("silent edit " .. tmp)
|
||||
child.lua "vim.treesitter.start()"
|
||||
|
||||
local bufnr = child.fn.bufnr(tmp)
|
||||
if pos then
|
||||
child.fn.setpos(".", { child.fn.bufnr(tmp), unpack(pos) })
|
||||
child.fn.setpos(".", { bufnr, unpack(pos) })
|
||||
end
|
||||
|
||||
return {
|
||||
tmp = tmp,
|
||||
bufnr = bufnr,
|
||||
fixtures = fixtures,
|
||||
}
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue