diff options
-rw-r--r-- | test/functional/provider/nodejs_spec.lua | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/test/functional/provider/nodejs_spec.lua b/test/functional/provider/nodejs_spec.lua index d9af020bfe..f69c3e7c78 100644 --- a/test/functional/provider/nodejs_spec.lua +++ b/test/functional/provider/nodejs_spec.lua @@ -45,15 +45,13 @@ describe('nodejs host', function() const nvim = neovim.attach({socket: socket}); class TestPlugin { - hello() { - this.nvim.command('let g:job_out = "hello-plugin"') - } + hello() { + this.nvim.command('let g:job_out = "hello-plugin"'); + } } - const PluginClass = neovim.Plugin(TestPlugin); - const plugin = new PluginClass(nvim); - plugin.hello(); - nvim.command('call jobstop(g:job_id)'); + const plugin = new neovim.NvimPlugin(null, PluginClass, nvim); + plugin.instance.hello(); ]]) command('let g:job_id = jobstart(["node", "'..fname..'"])') retry(nil, 2000, function() eq('hello-plugin', eval('g:job_out')) end) |