aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-06-05 14:08:32 +0200
committerGitHub <noreply@github.com>2018-06-05 14:08:32 +0200
commitd9d91bbfef883c72e71bbc966274ddd7157d0060 (patch)
treea43d5bceabf50ae7c2f4a29027481138e004a19c
parentae927a49f7e3db3b1a2ba7e8e07736695594028d (diff)
parent6ffcc2b8002d37986b3ee2b9471c460af8d0c669 (diff)
downloadrneovim-d9d91bbfef883c72e71bbc966274ddd7157d0060.tar.gz
rneovim-d9d91bbfef883c72e71bbc966274ddd7157d0060.tar.bz2
rneovim-d9d91bbfef883c72e71bbc966274ddd7157d0060.zip
Merge #8482 'test: give more time for nodejs'
-rw-r--r--ci/build.ps11
-rwxr-xr-xci/install.sh1
-rw-r--r--test/functional/provider/nodejs_spec.lua12
-rw-r--r--test/helpers.lua2
4 files changed, 7 insertions, 9 deletions
diff --git a/ci/build.ps1 b/ci/build.ps1
index 8eb237ccd1..7e686f3464 100644
--- a/ci/build.ps1
+++ b/ci/build.ps1
@@ -77,6 +77,7 @@ where.exe neovim-ruby-host.bat ; exitIfFailed
cmd /c npm.cmd install -g neovim ; exitIfFailed
where.exe neovim-node-host.cmd ; exitIfFailed
+cmd /c npm link neovim
function convertToCmakeArgs($vars) {
return $vars.GetEnumerator() | foreach { "-D$($_.Key)=$($_.Value)" }
diff --git a/ci/install.sh b/ci/install.sh
index 50f3490b63..e95e2f29c1 100755
--- a/ci/install.sh
+++ b/ci/install.sh
@@ -33,3 +33,4 @@ fi
echo "Install neovim npm package"
npm install -g neovim
+npm link neovim
diff --git a/test/functional/provider/nodejs_spec.lua b/test/functional/provider/nodejs_spec.lua
index f69c3e7c78..07a00f8a8c 100644
--- a/test/functional/provider/nodejs_spec.lua
+++ b/test/functional/provider/nodejs_spec.lua
@@ -16,7 +16,6 @@ end
before_each(function()
clear()
- command([[let $NODE_PATH = get(split(system('npm root -g'), "\n"), 0, '')]])
end)
describe('nodejs host', function()
@@ -28,21 +27,18 @@ describe('nodejs host', function()
it('works', function()
local fname = 'Xtest-nodejs-hello.js'
write_file(fname, [[
- const socket = process.env.NVIM_LISTEN_ADDRESS;
const neovim = require('neovim');
- const nvim = neovim.attach({socket: socket});
+ const nvim = neovim.attach({socket: process.env.NVIM_LISTEN_ADDRESS});
nvim.command('let g:job_out = "hello"');
- nvim.command('call jobstop(g:job_id)');
]])
command('let g:job_id = jobstart(["node", "'..fname..'"])')
- retry(nil, 2000, function() eq('hello', eval('g:job_out')) end)
+ retry(nil, 3000, function() eq('hello', eval('g:job_out')) end)
end)
it('plugin works', function()
local fname = 'Xtest-nodejs-hello-plugin.js'
write_file(fname, [[
- const socket = process.env.NVIM_LISTEN_ADDRESS;
const neovim = require('neovim');
- const nvim = neovim.attach({socket: socket});
+ const nvim = neovim.attach({socket: process.env.NVIM_LISTEN_ADDRESS});
class TestPlugin {
hello() {
@@ -54,6 +50,6 @@ describe('nodejs host', function()
plugin.instance.hello();
]])
command('let g:job_id = jobstart(["node", "'..fname..'"])')
- retry(nil, 2000, function() eq('hello-plugin', eval('g:job_out')) end)
+ retry(nil, 3000, function() eq('hello-plugin', eval('g:job_out')) end)
end)
end)
diff --git a/test/helpers.lua b/test/helpers.lua
index 0d3fe1316b..a774a67df3 100644
--- a/test/helpers.lua
+++ b/test/helpers.lua
@@ -259,7 +259,7 @@ local function check_cores(app, force)
else
initial_path = '.'
re = '/core[^/]*$'
- exc_re = { '^/%.deps$', local_tmpdir }
+ exc_re = { '^/%.deps$', local_tmpdir, '^/%node_modules$' }
db_cmd = gdb_db_cmd
random_skip = true
end