@iobroker/testing
Advanced tools
Comparing version 4.1.1 to 4.1.2
@@ -33,6 +33,11 @@ "use strict"; | ||
if (isWindows) { | ||
if (command === "npm") | ||
if (command === "npm") { | ||
command += ".cmd"; | ||
else if (command === "node") | ||
// Needed since Node.js v18.20.2 and v20.12.2 | ||
// https://github.com/nodejs/node/releases/tag/v18.20.2 | ||
spawnOptions.shell = true; | ||
} | ||
else if (command === "node") { | ||
command += ".exe"; | ||
} | ||
} | ||
@@ -39,0 +44,0 @@ if (options.logCommandExecution == null) |
@@ -120,2 +120,8 @@ "use strict"; | ||
const client = new net_1.Socket(); | ||
const timeout = setTimeout(() => { | ||
// Assume the connection failed after 1 s | ||
client.destroy(); | ||
debug(` => false`); | ||
resolve(false); | ||
}, 1000); | ||
// Try to connect to an existing ObjectsDB | ||
@@ -131,2 +137,3 @@ client | ||
debug(` => true`); | ||
clearTimeout(timeout); | ||
resolve(true); | ||
@@ -137,10 +144,5 @@ }) | ||
debug(` => false`); | ||
clearTimeout(timeout); | ||
resolve(false); | ||
}); | ||
setTimeout(() => { | ||
// Assume the connection failed after 1 s | ||
client.destroy(); | ||
debug(` => false`); | ||
resolve(false); | ||
}, 1000); | ||
}); | ||
@@ -147,0 +149,0 @@ } |
{ | ||
"name": "@iobroker/testing", | ||
"version": "4.1.1", | ||
"version": "4.1.2", | ||
"description": "Shared utilities for adapter and module testing in ioBroker", | ||
@@ -41,3 +41,3 @@ "main": "build/index.js", | ||
"devDependencies": { | ||
"@alcalzone/release-script": "^3.5.9", | ||
"@alcalzone/release-script": "^3.7.0", | ||
"@alcalzone/release-script-plugin-license": "^3.5.9", | ||
@@ -44,0 +44,0 @@ "@iobroker/adapter-core": "^2.6.8", |
146320
3247