fix: port ci and markdown cleanup from backlog

This commit is contained in:
Affaan Mustafa
2026-04-02 17:09:21 -07:00
parent 70be8f9f44
commit a60d5fbc00
10 changed files with 44 additions and 34 deletions

View File

@@ -25,9 +25,11 @@ function readJson(filePath) {
const REPO_ROOT = path.join(__dirname, '..', '..');
function run(args = [], options = {}) {
const homeDir = options.homeDir || process.env.HOME;
const env = {
...process.env,
HOME: options.homeDir || process.env.HOME,
HOME: homeDir,
USERPROFILE: homeDir,
...(options.env || {}),
};
@@ -365,10 +367,13 @@ function runTests() {
const settings = readJson(path.join(claudeRoot, 'settings.json'));
const installedHooks = readJson(path.join(claudeRoot, 'hooks', 'hooks.json'));
const normSep = (s) => s.replace(/\\/g, '/');
const expectedFragment = normSep(path.join(claudeRoot, 'scripts', 'hooks', 'auto-tmux-dev.js'));
const autoTmuxEntry = settings.hooks.PreToolUse.find(entry => entry.id === 'pre:bash:auto-tmux-dev');
assert.ok(autoTmuxEntry, 'settings.json should include the auto tmux hook');
assert.ok(
autoTmuxEntry.hooks[0].command.includes(path.join(claudeRoot, 'scripts', 'hooks', 'auto-tmux-dev.js')),
normSep(autoTmuxEntry.hooks[0].command).includes(expectedFragment),
'settings.json should use the installed Claude root for hook commands'
);
assert.ok(
@@ -379,7 +384,7 @@ function runTests() {
const installedAutoTmuxEntry = installedHooks.hooks.PreToolUse.find(entry => entry.id === 'pre:bash:auto-tmux-dev');
assert.ok(installedAutoTmuxEntry, 'hooks/hooks.json should include the auto tmux hook');
assert.ok(
installedAutoTmuxEntry.hooks[0].command.includes(path.join(claudeRoot, 'scripts', 'hooks', 'auto-tmux-dev.js')),
normSep(installedAutoTmuxEntry.hooks[0].command).includes(expectedFragment),
'hooks/hooks.json should use the installed Claude root for hook commands'
);
assert.ok(