aboutsummaryrefslogtreecommitdiff
path: root/tests/drivers/nav_test.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/drivers/nav_test.js')
-rw-r--r--tests/drivers/nav_test.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/drivers/nav_test.js b/tests/drivers/nav_test.js
index 23afbf8..8f0d8fd 100644
--- a/tests/drivers/nav_test.js
+++ b/tests/drivers/nav_test.js
@@ -1,5 +1,7 @@
// go to definition and find references, in the document and across includes.
// usage: node tests/drivers/nav_test.js path/to/zclsp (run from the repository root)
+// interpreted hosts (no jit) are far slower; ZC_TEST_TIMEOUT_SCALE stretches every deadline
+const TIMEOUT_SCALE = Number(process.env.ZC_TEST_TIMEOUT_SCALE) || 1;
const assert = require('assert');
const cp = require('child_process');
const fs = require('fs');
@@ -18,7 +20,7 @@ function request(text, needle, method, extra = {}) {
{ jsonrpc: '2.0', method: 'textDocument/didOpen', params: { textDocument: { uri, version: 1, languageId: 'zc', text } } },
{ jsonrpc: '2.0', id: 2, method, params: { textDocument: { uri }, position, ...extra } },
{ jsonrpc: '2.0', method: 'exit' }].map(frame));
- const r = cp.spawnSync(server, process.argv.slice(3), { input, cwd: root, timeout: 30000, maxBuffer: 8 << 20 });
+ const r = cp.spawnSync(server, process.argv.slice(3), { input, cwd: root, timeout: 30000 * TIMEOUT_SCALE, maxBuffer: 8 << 20 });
assert.strictEqual(r.status, 0, String(r.stderr));
let d = r.stdout, init;
while (d.length) {