@@ -2,13 +2,11 @@ import ComponentDetection, { DependencyGraphs } from "./componentDetection";
2
2
import fs from "fs" ;
3
3
4
4
test ( "Downloads CLI" , async ( ) => {
5
- console . log ( "Downloads CLI" )
6
5
await ComponentDetection . downloadLatestRelease ( ) ;
7
6
expect ( fs . existsSync ( ComponentDetection . componentDetectionPath ) ) ;
8
7
} ) ;
9
8
10
9
test ( "Runs CLI" , async ( ) => {
11
- console . log ( "Runs CLI" )
12
10
await ComponentDetection . downloadLatestRelease ( ) ;
13
11
await ComponentDetection . runComponentDetection ( "./test" ) ;
14
12
expect ( fs . existsSync ( ComponentDetection . outputPath ) ) ;
@@ -23,7 +21,6 @@ test("Parses CLI output", async () => {
23
21
24
22
describe ( "ComponentDetection.makePackageUrl" , ( ) => {
25
23
test ( "returns a valid package url from saturated object" , ( ) => {
26
- console . log ( "ComponentDetection.makePackageUrl" )
27
24
const packageUrl = ComponentDetection . makePackageUrl ( {
28
25
Scheme : "pkg" ,
29
26
Type : "npm" ,
@@ -41,7 +38,6 @@ describe("ComponentDetection.makePackageUrl", () => {
41
38
} ) ;
42
39
43
40
test ( "returns valid package url without dangling ? with empty qualifers" , ( ) => {
44
- console . log ( "returns valid package url without dangling ? with empty qualifers" )
45
41
const packageUrl = ComponentDetection . makePackageUrl ( {
46
42
Scheme : "pkg" ,
47
43
Type : "npm" ,
@@ -192,7 +188,6 @@ describe('normalizeDependencyGraphPaths', () => {
192
188
expect ( Object . keys ( normalized ) ) . toContain ( 'b/package.json' ) ;
193
189
expect ( normalized [ 'a/package.json' ] . graph ) . toEqual ( { 'foo' : null } ) ;
194
190
expect ( normalized [ 'b/package.json' ] . graph ) . toEqual ( { 'bar' : null } ) ;
195
- console . log ( normalized ) ;
196
191
} ) ;
197
192
} ) ;
198
193
@@ -219,7 +214,6 @@ describe('normalizeDependencyGraphPaths with real output.json', () => {
219
214
} ) ;
220
215
221
216
test ( 'full action scan creates manifests with correct names and file source locations' , async ( ) => {
222
- // Run the full action flow
223
217
const manifests = await ComponentDetection . scanAndGetManifests ( './test' ) ;
224
218
225
219
expect ( manifests ) . toBeDefined ( ) ;
@@ -230,7 +224,6 @@ describe('normalizeDependencyGraphPaths with real output.json', () => {
230
224
expect ( manifest . name . startsWith ( '/' ) ) . toBe ( false ) ;
231
225
}
232
226
233
- // Expected manifest names based on test data files
234
227
const expectedManifestNames = [
235
228
'package.json' ,
236
229
'package-lock.json' ,
@@ -245,19 +238,12 @@ describe('normalizeDependencyGraphPaths with real output.json', () => {
245
238
return acc ;
246
239
} , { } as Record < string , any > ) ;
247
240
248
- console . log ( 'Found manifests:' , Object . keys ( manifestsByName ) ) ;
249
-
250
241
// Check each expected manifest if it exists
251
242
for ( const expectedName of expectedManifestNames ) {
252
243
const manifest = manifestsByName [ expectedName ] ;
253
244
if ( manifest ) {
254
- // Check manifest name is correct
255
245
expect ( manifest . name ) . toBe ( expectedName ) ;
256
-
257
- // Check file source location matches the manifest name
258
246
expect ( manifest . file ?. source_location ) . toBe ( expectedName ) ;
259
-
260
- console . log ( `✓ Verified manifest: ${ expectedName } ` ) ;
261
247
}
262
248
}
263
249
0 commit comments