aboutsummaryrefslogtreecommitdiff
path: root/test/functional/provider/define_spec.lua
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2024-04-20 17:44:13 +0200
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2024-04-23 18:17:04 +0200
commit052498ed42780a76daea589d063cd8947a894673 (patch)
treeb6c85416a4d7ced5eabb0a7a3866f5e0fee886cc /test/functional/provider/define_spec.lua
parentc5af5c0b9ab84c86f84e32210512923e7eb641ba (diff)
downloadrneovim-052498ed42780a76daea589d063cd8947a894673.tar.gz
rneovim-052498ed42780a76daea589d063cd8947a894673.tar.bz2
rneovim-052498ed42780a76daea589d063cd8947a894673.zip
test: improve test conventions
Specifically, functions that are run in the context of the test runner are put in module `test/testutil.lua` while the functions that are run in the context of the test session are put in `test/functional/testnvim.lua`. Closes https://github.com/neovim/neovim/issues/27004.
Diffstat (limited to 'test/functional/provider/define_spec.lua')
-rw-r--r--test/functional/provider/define_spec.lua16
1 files changed, 9 insertions, 7 deletions
diff --git a/test/functional/provider/define_spec.lua b/test/functional/provider/define_spec.lua
index f0d47cae16..3945486d98 100644
--- a/test/functional/provider/define_spec.lua
+++ b/test/functional/provider/define_spec.lua
@@ -1,8 +1,10 @@
-local t = require('test.functional.testutil')()
-local eval, command = t.eval, t.command
-local eq, run, stop = t.eq, t.run, t.stop
-local clear = t.clear
-local api = t.api
+local t = require('test.testutil')
+local n = require('test.functional.testnvim')()
+
+local eval, command = n.eval, n.command
+local eq, run, stop = t.eq, n.run, n.stop
+local clear = n.clear
+local api = n.api
local function get_prefix(sync)
if sync then
@@ -28,7 +30,7 @@ local function runx(sync, handler, on_setup)
local function setup_cb(...)
on_setup(...)
-- need to stop on setup callback because there's two session:request
- -- calls in `request/testutil.lua`. The second call will always return
+ -- calls in `request/testnvim.lua`. The second call will always return
-- after pending notification/request callbacks are processed
stop()
end
@@ -324,7 +326,7 @@ local function function_specs_for(fn, sync, first_arg_factory, init)
end)
it('with range', function()
- t.insert([[
+ n.insert([[
foo
bar
baz