mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 05:58:33 +00:00
test: don't call clear() in both before_each() and after_each() (#35901)
This commit is contained in:
@@ -5,7 +5,6 @@ local eq = t.eq
|
||||
|
||||
describe('glob', function()
|
||||
before_each(n.clear)
|
||||
after_each(n.clear)
|
||||
|
||||
local match = function(pattern, str)
|
||||
return n.exec_lua(function()
|
||||
|
@@ -9,7 +9,6 @@ local insert = n.insert
|
||||
|
||||
describe('vim.pos', function()
|
||||
before_each(clear)
|
||||
after_each(clear)
|
||||
|
||||
it('creates a position with or without optional fields', function()
|
||||
local pos = exec_lua(function()
|
||||
|
@@ -9,7 +9,6 @@ local insert = n.insert
|
||||
|
||||
describe('vim.range', function()
|
||||
before_each(clear)
|
||||
after_each(clear)
|
||||
|
||||
it('creates a range with or without optional fields', function()
|
||||
local range = exec_lua(function()
|
||||
|
@@ -33,7 +33,6 @@ describe('vim.snippet', function()
|
||||
set_snippet_jump(-1, '<S-Tab>')
|
||||
end)
|
||||
end)
|
||||
after_each(clear)
|
||||
|
||||
--- @param snippet string[]
|
||||
--- @param expected string[]
|
||||
|
@@ -9,7 +9,6 @@ describe('vim.lsp.codelens', function()
|
||||
n.clear()
|
||||
exec_lua('require("vim.lsp")')
|
||||
end)
|
||||
after_each(n.clear)
|
||||
|
||||
it('on_codelens_stores_and_displays_lenses', function()
|
||||
local fake_uri = 'file:///fake/uri'
|
||||
|
@@ -863,8 +863,6 @@ describe('vim.lsp.completion: protocol', function()
|
||||
end)
|
||||
end)
|
||||
|
||||
after_each(clear)
|
||||
|
||||
local function assert_matches(fn)
|
||||
retry(nil, nil, function()
|
||||
fn(exec_lua('return _G.capture.matches'))
|
||||
@@ -1262,8 +1260,6 @@ describe('vim.lsp.completion: integration', function()
|
||||
end)
|
||||
end)
|
||||
|
||||
after_each(clear)
|
||||
|
||||
it('puts cursor at the end of completed word', function()
|
||||
local completion_list = {
|
||||
isIncomplete = false,
|
||||
|
@@ -115,10 +115,6 @@ describe('vim.lsp.diagnostic', function()
|
||||
end)
|
||||
end)
|
||||
|
||||
after_each(function()
|
||||
clear()
|
||||
end)
|
||||
|
||||
describe('vim.lsp.diagnostic.on_publish_diagnostics', function()
|
||||
it('correctly handles UTF-16 offsets', function()
|
||||
local line = 'All 💼 and no 🎉 makes Jack a dull 👦'
|
||||
|
@@ -9,7 +9,6 @@ local exec_lua = n.exec_lua
|
||||
|
||||
describe('vim.lsp._snippet_grammar', function()
|
||||
before_each(n.clear)
|
||||
after_each(n.clear)
|
||||
|
||||
local parse = function(...)
|
||||
local res = exec_lua('return require("vim.lsp._snippet_grammar").parse(...)', ...)
|
||||
|
Reference in New Issue
Block a user