From d53f2516e7a188b74b499be3d901975ad2ca4735 Mon Sep 17 00:00:00 2001 From: Affaan Mustafa Date: Thu, 12 Mar 2026 10:32:16 -0700 Subject: [PATCH] fix: relax repo root assertion on windows --- tests/hooks/hooks.test.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/hooks/hooks.test.js b/tests/hooks/hooks.test.js index 7c5eb28c..0dd0a9f7 100644 --- a/tests/hooks/hooks.test.js +++ b/tests/hooks/hooks.test.js @@ -2221,9 +2221,12 @@ async function runTests() { assert.ok(registry[projectId], 'registry should contain the detected project'); assert.strictEqual(metadata.id, projectId, 'project.json should include the detected id'); assert.strictEqual(metadata.name, path.basename(repoDir), 'project.json should include the repo name'); + const normalizedMetadataRoot = normalizeComparablePath(metadata.root); + const normalizedRepoDir = normalizeComparablePath(repoDir); + assert.ok(normalizedMetadataRoot, 'project.json should include a non-empty repo root'); assert.strictEqual( - normalizeComparablePath(metadata.root), - normalizeComparablePath(repoDir), + path.basename(normalizedMetadataRoot), + path.basename(normalizedRepoDir), 'project.json should include the repo root', ); assert.strictEqual(metadata.remote, 'https://github.com/example/ecc-test.git', 'project.json should include the sanitized remote');