refactor(tests): remove boilerplate even further

This commit is contained in:
Oleksandr Smirnov 2025-03-22 20:16:32 +02:00
parent b2780c8efb
commit 2ca302a7a5
No known key found for this signature in database
6 changed files with 35 additions and 60 deletions

View file

@ -1,17 +1,9 @@
local t = require "spec.testutils"
local child = MiniTest.new_child_neovim()
local T = MiniTest.new_set {
hooks = {
post_once = child.stop,
pre_case = function()
child.restart { "-u", t.mininit_path }
end,
},
}
local child, T = t.setup()
local function do_the_test(fixture, pos)
local rs = t.setup("comment/" .. fixture, child, pos)
local rs = t.setup_test("comment/" .. fixture, child, pos)
child.cmd "GoCmt"
child.cmd "write"