test: nodejs_spec: fix test after upstream API change

closes https://github.com/neovim/node-client/issues/72
This commit is contained in:
Justin M. Keyes
2018-05-15 00:02:37 +02:00
parent 36b2e3f743
commit efb6caa39b

View File

@@ -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)