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 function get_ns()
local ns = meths.get_namespaces().Test_set_hl local ns = meths.create_namespace('Test_set_hl')
if not ns then ns = meths.create_namespace('Test_set_hl') end
meths._set_hl_ns(ns) meths._set_hl_ns(ns)
return ns return ns
end end
before_each(clear)
it ("can set gui highlight", function() it ("can set gui highlight", function()
local ns = get_ns() local ns = get_ns()
meths.set_hl(ns, 'Test_hl', highlight1) meths.set_hl(ns, 'Test_hl', highlight1)