mirror of
https://github.com/affaan-m/ECC.git
synced 2026-09-13 13:17:55 +02:00
refactor(ito): share invocation command detection
This commit is contained in:
@@ -20,6 +20,7 @@ const {
|
||||
} = require("../../scripts/ito");
|
||||
const {
|
||||
createSafeItoInvocationEnvironment,
|
||||
getInvocationCommand,
|
||||
} = require("../../scripts/lib/ito-environment");
|
||||
|
||||
function runCli(args, environment = {}) {
|
||||
@@ -323,6 +324,11 @@ function main() {
|
||||
assert.strictEqual(safe.ITO_API_KEY, undefined);
|
||||
assert.strictEqual(safe.SIXTYTWO_TOKEN, undefined);
|
||||
}],
|
||||
["detects the Itō command consistently with or without the global JSON flag", () => {
|
||||
assert.strictEqual(getInvocationCommand(["auth"]), "auth");
|
||||
assert.strictEqual(getInvocationCommand(["--json", "evals"]), "evals");
|
||||
assert.strictEqual(getInvocationCommand([]), undefined);
|
||||
}],
|
||||
["bounds the outer node-qualification process beyond the canonical timeout", () => {
|
||||
assert.strictEqual(NODE_QUALIFICATION_TIMEOUT_MS, 31 * 60 * 1000);
|
||||
const source = fs.readFileSync(ITO_SCRIPT, "utf8");
|
||||
|
||||
Reference in New Issue
Block a user