aboutsummaryrefslogtreecommitdiff
path: root/tests/drivers/hints_test.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/drivers/hints_test.js')
-rw-r--r--tests/drivers/hints_test.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/drivers/hints_test.js b/tests/drivers/hints_test.js
index 8bb1934..b3598be 100644
--- a/tests/drivers/hints_test.js
+++ b/tests/drivers/hints_test.js
@@ -1,5 +1,7 @@
// hints are informational diagnostics (severity 3) and follow positional hints on / small / off directives.
// usage: node tests/drivers/hints_test.js path/to/zclsp
+// 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 server = process.argv[2];
@@ -10,7 +12,7 @@ function diagnostics(text) {
{ jsonrpc: '2.0', id: 1, method: 'initialize', params: {} },
{ jsonrpc: '2.0', method: 'textDocument/didOpen', params: { textDocument: { uri, version: 1, languageId: 'zc', text } } },
{ jsonrpc: '2.0', method: 'exit' }].map(frame));
- const r = cp.spawnSync(server, process.argv.slice(3), { input, timeout: 20000, maxBuffer: 4 << 20 });
+ const r = cp.spawnSync(server, process.argv.slice(3), { input, timeout: 20000 * TIMEOUT_SCALE, maxBuffer: 4 << 20 });
assert.strictEqual(r.status, 0, String(r.stderr));
let d = r.stdout, out = [];
while (d.length) {