Improvements to tests

This commit is contained in:
shadmansaleh 2021-04-03 15:54:34 +06:00
parent f4224a12c0
commit 0559d3f9c6

View File

@ -218,12 +218,13 @@ describe("API: set highlight", function()
}
local function get_ns()
local ns = meths.get_namespaces().Test_set_hl
if not ns then ns = meths.create_namespace('Test_set_hl') end
local ns = meths.create_namespace('Test_set_hl')
meths._set_hl_ns(ns)
return ns
end
before_each(clear)
it ("can set gui highlight", function()
local ns = get_ns()
meths.set_hl(ns, 'Test_hl', highlight1)