fix(tests): the post-compact hook test takes its child timeout from the shared timing helper
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
cd3225b630
commit
c9248bbb52
4 changed files with 40 additions and 5 deletions
|
|
@ -13,6 +13,7 @@ import { join, dirname } from 'node:path';
|
|||
import { fileURLToPath } from 'node:url';
|
||||
import { execFile } from 'node:child_process';
|
||||
import { childEnv } from '../helpers/child-env.mjs';
|
||||
import { HOOK_CHILD_TIMEOUT_MS } from '../helpers/timing.mjs';
|
||||
|
||||
const HERE = dirname(fileURLToPath(import.meta.url));
|
||||
const ROOT = join(HERE, '..', '..');
|
||||
|
|
@ -23,10 +24,10 @@ function runHookIn(cwd, input = {}) {
|
|||
const child = execFile(
|
||||
'node',
|
||||
[HOOK],
|
||||
{ timeout: 5000, cwd, env: childEnv() },
|
||||
{ timeout: HOOK_CHILD_TIMEOUT_MS, cwd, env: childEnv() },
|
||||
(err, stdout, stderr) => {
|
||||
resolve({
|
||||
code: child.exitCode ?? 0,
|
||||
code: child.exitCode ?? 1,
|
||||
stdout: stdout || '',
|
||||
stderr: stderr || '',
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue