diff --git a/tests/spec/lualine_spec.lua b/tests/spec/lualine_spec.lua index 9e39570..f433c7d 100644 --- a/tests/spec/lualine_spec.lua +++ b/tests/spec/lualine_spec.lua @@ -253,12 +253,7 @@ describe('Lualine', function() require('lualine').setup(config) local old_ft = vim.bo.ft vim.bo.ft = 'test_ft' - statusline:expect([===[ - highlights = { - 1: StatusLine = { bold = true, reverse = true } - } - || - ]===]) + statusline:expect(nil) vim.bo.ft = old_ft end) diff --git a/tests/statusline.lua b/tests/statusline.lua index 6f6a987..0dac80d 100644 --- a/tests/statusline.lua +++ b/tests/statusline.lua @@ -210,6 +210,11 @@ local function eval_stl(stl_expr, width, eval_type) end function M:expect_expr(expect, expr) + if expr == nil then + -- test if both are nil when running expect against nil + assert.are.same(expect, nil) + return + end expect = helpers.dedent(expect) local actual = eval_stl(expr, self.width, self.type) local matched = true