Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions tests/plenary/state/state_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,9 @@ describe('State', function()
it('should be able to self-heal from an invalid state file', function()
state:save_sync()

-- Mangle the cache
vim.cmd.edit(cache_path)
vim.cmd(('edit %s'):format(cache_path))
vim.api.nvim_buf_set_lines(0, 0, -1, false, { '[ invalid json!' })
vim.cmd.write()
vim.cmd('write')

-- Ensure we reload the state from its cache file (this should also "heal" the cache)
state._ctx.loaded = false
Expand Down