fix(ci): format

This commit is contained in:
Barrett Ruth 2025-09-19 13:19:30 -04:00
parent 21407be376
commit 526c82cac0
2 changed files with 25 additions and 24 deletions

View file

@ -153,7 +153,11 @@ describe('cp.diff', function()
describe('render_diff', function() describe('render_diff', function()
it('uses best available backend', function() it('uses best available backend', function()
local mock_get_best = spy.on(diff, 'get_best_backend') local mock_get_best = spy.on(diff, 'get_best_backend')
local mock_backend = { render = function() return {} end } local mock_backend = {
render = function()
return {}
end,
}
mock_get_best.returns(mock_backend) mock_get_best.returns(mock_backend)
diff.render_diff('expected', 'actual', 'vim') diff.render_diff('expected', 'actual', 'vim')

View file

@ -72,20 +72,17 @@ index 1234567..abcdefg 100644
line = 0, line = 0,
col_start = 5, col_start = 5,
col_end = 10, col_end = 10,
highlight_group = 'CpDiffAdded' highlight_group = 'CpDiffAdded',
} },
} }
highlight.apply_highlights(bufnr, highlights, namespace) highlight.apply_highlights(bufnr, highlights, namespace)
assert.spy(mock_extmark).was_called_with( assert.spy(mock_extmark).was_called_with(bufnr, namespace, 0, 5, {
bufnr, namespace, 0, 5,
{
end_col = 10, end_col = 10,
hl_group = 'CpDiffAdded', hl_group = 'CpDiffAdded',
priority = 100 priority = 100,
} })
)
mock_extmark:revert() mock_extmark:revert()
end) end)
@ -96,8 +93,8 @@ index 1234567..abcdefg 100644
line = 0, line = 0,
col_start = 0, col_start = 0,
col_end = 5, col_end = 5,
highlight_group = 'CpDiffAdded' highlight_group = 'CpDiffAdded',
} },
} }
highlight.apply_highlights(1, highlights, 100) highlight.apply_highlights(1, highlights, 100)