perf(diagnostic): use api variable and improve validate (#21111)

* fix(diagnostic): use api variable and improve validate

* fix: fix test case
This commit is contained in:
Raphael
2022-11-19 21:41:47 +08:00
committed by GitHub
parent 4650af38f0
commit 6e8ed5abaa
2 changed files with 47 additions and 51 deletions

View File

@@ -1776,7 +1776,7 @@ end)
return lines
]])
eq(".../diagnostic.lua:0: prefix: expected 'string' or 'table' or 'function', got 42",
eq(".../diagnostic.lua:0: prefix: expected string|table|function, got number",
pcall_err(exec_lua, [[ vim.diagnostic.open_float({ prefix = 42 }) ]]))
end)