@@ -2,13 +2,11 @@ import ComponentDetection, { DependencyGraphs } from "./componentDetection";
22import fs from "fs" ;
33
44test ( "Downloads CLI" , async ( ) => {
5- console . log ( "Downloads CLI" )
65 await ComponentDetection . downloadLatestRelease ( ) ;
76 expect ( fs . existsSync ( ComponentDetection . componentDetectionPath ) ) ;
87} ) ;
98
109test ( "Runs CLI" , async ( ) => {
11- console . log ( "Runs CLI" )
1210 await ComponentDetection . downloadLatestRelease ( ) ;
1311 await ComponentDetection . runComponentDetection ( "./test" ) ;
1412 expect ( fs . existsSync ( ComponentDetection . outputPath ) ) ;
@@ -23,7 +21,6 @@ test("Parses CLI output", async () => {
2321
2422describe ( "ComponentDetection.makePackageUrl" , ( ) => {
2523 test ( "returns a valid package url from saturated object" , ( ) => {
26- console . log ( "ComponentDetection.makePackageUrl" )
2724 const packageUrl = ComponentDetection . makePackageUrl ( {
2825 Scheme : "pkg" ,
2926 Type : "npm" ,
@@ -41,7 +38,6 @@ describe("ComponentDetection.makePackageUrl", () => {
4138 } ) ;
4239
4340 test ( "returns valid package url without dangling ? with empty qualifers" , ( ) => {
44- console . log ( "returns valid package url without dangling ? with empty qualifers" )
4541 const packageUrl = ComponentDetection . makePackageUrl ( {
4642 Scheme : "pkg" ,
4743 Type : "npm" ,
@@ -192,7 +188,6 @@ describe('normalizeDependencyGraphPaths', () => {
192188 expect ( Object . keys ( normalized ) ) . toContain ( 'b/package.json' ) ;
193189 expect ( normalized [ 'a/package.json' ] . graph ) . toEqual ( { 'foo' : null } ) ;
194190 expect ( normalized [ 'b/package.json' ] . graph ) . toEqual ( { 'bar' : null } ) ;
195- console . log ( normalized ) ;
196191 } ) ;
197192} ) ;
198193
@@ -219,7 +214,6 @@ describe('normalizeDependencyGraphPaths with real output.json', () => {
219214 } ) ;
220215
221216 test ( 'full action scan creates manifests with correct names and file source locations' , async ( ) => {
222- // Run the full action flow
223217 const manifests = await ComponentDetection . scanAndGetManifests ( './test' ) ;
224218
225219 expect ( manifests ) . toBeDefined ( ) ;
@@ -230,7 +224,6 @@ describe('normalizeDependencyGraphPaths with real output.json', () => {
230224 expect ( manifest . name . startsWith ( '/' ) ) . toBe ( false ) ;
231225 }
232226
233- // Expected manifest names based on test data files
234227 const expectedManifestNames = [
235228 'package.json' ,
236229 'package-lock.json' ,
@@ -245,19 +238,12 @@ describe('normalizeDependencyGraphPaths with real output.json', () => {
245238 return acc ;
246239 } , { } as Record < string , any > ) ;
247240
248- console . log ( 'Found manifests:' , Object . keys ( manifestsByName ) ) ;
249-
250241 // Check each expected manifest if it exists
251242 for ( const expectedName of expectedManifestNames ) {
252243 const manifest = manifestsByName [ expectedName ] ;
253244 if ( manifest ) {
254- // Check manifest name is correct
255245 expect ( manifest . name ) . toBe ( expectedName ) ;
256-
257- // Check file source location matches the manifest name
258246 expect ( manifest . file ?. source_location ) . toBe ( expectedName ) ;
259-
260- console . log ( `✓ Verified manifest: ${ expectedName } ` ) ;
261247 }
262248 }
263249
0 commit comments