diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/autocmd/tabnew_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/helpers.lua | 2 | ||||
-rw-r--r-- | test/functional/job/job_spec.lua | 8 |
3 files changed, 7 insertions, 5 deletions
diff --git a/test/functional/autocmd/tabnew_spec.lua b/test/functional/autocmd/tabnew_spec.lua index 970ca19726..d80644cd92 100644 --- a/test/functional/autocmd/tabnew_spec.lua +++ b/test/functional/autocmd/tabnew_spec.lua @@ -4,8 +4,8 @@ local clear, nvim, buffer, curbuf, curwin, eq, neq, ok = helpers.eq, helpers.neq, helpers.ok describe('TabNew', function() + setup(clear) describe('au TabNew', function() - clear() describe('with * as <afile>', function() it('matches when opening any new tab', function() nvim('command', 'au! TabNew * echom "tabnew:".tabpagenr().":".bufnr("")') diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index cc5d019863..393b42dda5 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -276,8 +276,6 @@ local function expect(contents) return eq(dedent(contents), curbuf_contents()) end -clear() - return { clear = clear, spawn = spawn, diff --git a/test/functional/job/job_spec.lua b/test/functional/job/job_spec.lua index 0d561ec4d7..c74ae047c5 100644 --- a/test/functional/job/job_spec.lua +++ b/test/functional/job/job_spec.lua @@ -6,10 +6,14 @@ local clear, nvim, eq, neq, ok, expect, eval, next_message, run, stop, session helpers.stop, helpers.session local nvim_dir, insert = helpers.nvim_dir, helpers.insert -local channel = nvim('get_api_info')[1] describe('jobs', function() - before_each(clear) + local channel + + before_each(function() + clear() + channel = nvim('get_api_info')[1] + end) -- Creates the string to make an autocmd to notify us. local notify_str = function(expr1, expr2) |