update test

This commit is contained in:
Lewis Jones
2025-07-09 11:46:15 +01:00
parent 98b7e66125
commit 5789c204e4
+3 -3
View File
@@ -198,9 +198,9 @@ describe('normalizeDependencyGraphPaths with real output.json', () => {
const dependencyGraphs = output.dependencyGraphs;
// Use the same filePath as the action default (".")
const normalized = ComponentDetection.normalizeDependencyGraphPaths(dependencyGraphs, 'test');
// Should contain /package.json and /package-lock.json as keys
expect(Object.keys(normalized)).toContain('/package.json');
expect(Object.keys(normalized)).toContain('/package-lock.json');
// Root level manifests should not have leading slashes
expect(Object.keys(normalized)).toContain('package.json');
expect(Object.keys(normalized)).toContain('package-lock.json');
// All keys should now be relative to the repo root (cwd) and start with '/'
for (const key of Object.keys(normalized)) {
expect(key.startsWith('/')).toBe(true);