test: preserve hook-only ESM workflows with user module scopes

This commit is contained in:
haelyra
2026-10-11 03:11:20 -04:00
parent 33b656c241
commit f1fafe670c
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -1138,7 +1138,7 @@ function runTests() {
fs.writeFileSync(scriptsPackagePath, userScriptsPackage);
const firstInstall = run(
['--target', 'claude-project', '--profile', 'core', '--enable-hooks'],
['--target', 'claude-project', '--modules', 'hooks-runtime', '--enable-hooks'],
{ cwd: projectDir, homeDir }
);
assert.strictEqual(firstInstall.code, 0, firstInstall.stderr);
@@ -1160,7 +1160,7 @@ function runTests() {
assert.match(hookResult.stderr, /no-verify/i);
const secondInstall = run(
['--target', 'claude-project', '--profile', 'core', '--enable-hooks'],
['--target', 'claude-project', '--modules', 'hooks-runtime', '--enable-hooks'],
{ cwd: projectDir, homeDir }
);
assert.strictEqual(secondInstall.code, 0, secondInstall.stderr);
+1 -1
View File
@@ -152,7 +152,7 @@ function runTests() {
execFileSync(
'node',
[INSTALL_SCRIPT, '--target', 'claude-project', '--profile', 'core', '--enable-hooks'],
[INSTALL_SCRIPT, '--target', 'claude-project', '--modules', 'hooks-runtime', '--enable-hooks'],
{
cwd: projectRoot,
env: {