Skip to content

Commit dbcfec2

Browse files
myakuraCopilot
andcommitted
process.execPathとtimeoutを使うよう修正
'node'の代わりにprocess.execPathを使いテスト実行バイナリを固定する。 またtimeout: 10000を追加しCLIがハングした場合に確実に終了させる。 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 7ab033f commit dbcfec2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test/cgmd/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
77
const CLI = join(__dirname, '../../bin/cgmd.js');
88

99
function runCLI(args) {
10-
return spawnSync('node', [CLI, ...args], { encoding: 'utf8' });
10+
return spawnSync(process.execPath, [CLI, ...args], { encoding: 'utf8', timeout: 10000 });
1111
}
1212

1313
describe('CodeGridMarkdown - CLI', function () {

0 commit comments

Comments
 (0)