mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 03:48:18 +00:00
test: Extend {unit,functional}.helpers with global helpers
Automatically include all "global helper" util functions in the unit.helpers and functional.helpers and modules. So tests don't need to expicitly do: local global_helpers = require('test.helpers')
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
-- Test server -> client RPC scenarios. Note: unlike `rpcnotify`, to evaluate
|
||||
-- `rpcrequest` calls we need the client event loop to be running.
|
||||
local helpers = require('test.functional.helpers')(after_each)
|
||||
local Paths = require('test.config.paths')
|
||||
|
||||
local clear, nvim, eval = helpers.clear, helpers.nvim, helpers.eval
|
||||
local eq, neq, run, stop = helpers.eq, helpers.neq, helpers.run, helpers.stop
|
||||
@@ -243,8 +242,8 @@ describe('server -> client', function()
|
||||
\ 'rpc': v:true
|
||||
\ }
|
||||
]])
|
||||
local lua_prog = Paths.test_lua_prg
|
||||
meths.set_var("args", {lua_prog, 'test/functional/api/rpc_fixture.lua'})
|
||||
meths.set_var("args", {helpers.test_lua_prg,
|
||||
'test/functional/api/rpc_fixture.lua'})
|
||||
jobid = eval("jobstart(g:args, g:job_opts)")
|
||||
neq(0, 'jobid')
|
||||
end)
|
||||
|
Reference in New Issue
Block a user