Skip to content

Commit 93ab0bb

Browse files
committed
test: improve CLI test determinism and remove redundant test logic
1 parent 8bf5781 commit 93ab0bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/cli.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
import { describe, it, expect } from "vitest";
5-
import { spawnSync } from "node:child_process";
5+
import { execSync } from "node:child_process";
66
import fs from "node:fs";
77
import os from "node:os";
88
import path from "node:path";
@@ -15,7 +15,7 @@ function run(args) {
1515

1616
function runWithEnv(args, env = {}, timeout = 10000) {
1717
try {
18-
const out = spawnSync(`node "${CLI}" ${args}`, {
18+
const out = execSync(`node "${CLI}" ${args}`, {
1919
encoding: "utf-8",
2020
timeout,
2121
env: { ...process.env, HOME: "/tmp/nemoclaw-cli-test-" + Date.now(), ...env },

0 commit comments

Comments
 (0)