fix: broken tests
This commit is contained in:
parent
e9b05e7f35
commit
8a9c97d111
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue