mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-11 03:43:30 +08:00
Fix integration/hooks tests to handle Windows platform differences
Co-authored-by: pangerlkr <73515951+pangerlkr@users.noreply.github.com>
This commit is contained in:
@@ -262,8 +262,13 @@ async function runTests() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
assert.ok(stderr.includes('BLOCKED'), 'Blocking hook should output BLOCKED');
|
// Hook only blocks on non-Windows platforms (tmux is Unix-only)
|
||||||
assert.strictEqual(code, 2, 'Blocking hook should exit with code 2');
|
if (process.platform === 'win32') {
|
||||||
|
assert.strictEqual(code, 0, 'On Windows, hook should not block (exit 0)');
|
||||||
|
} else {
|
||||||
|
assert.ok(stderr.includes('BLOCKED'), 'Blocking hook should output BLOCKED');
|
||||||
|
assert.strictEqual(code, 2, 'Blocking hook should exit with code 2');
|
||||||
|
}
|
||||||
})) passed++; else failed++;
|
})) passed++; else failed++;
|
||||||
|
|
||||||
// ==========================================
|
// ==========================================
|
||||||
@@ -298,7 +303,12 @@ async function runTests() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
assert.strictEqual(code, 2, 'Blocking hook should exit 2');
|
// Hook only blocks on non-Windows platforms (tmux is Unix-only)
|
||||||
|
if (process.platform === 'win32') {
|
||||||
|
assert.strictEqual(code, 0, 'On Windows, hook should not block (exit 0)');
|
||||||
|
} else {
|
||||||
|
assert.strictEqual(code, 2, 'Blocking hook should exit 2');
|
||||||
|
}
|
||||||
})) passed++; else failed++;
|
})) passed++; else failed++;
|
||||||
|
|
||||||
if (await asyncTest('hooks handle missing files gracefully', async () => {
|
if (await asyncTest('hooks handle missing files gracefully', async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user