@@ -221,7 +221,6 @@ test('full action scan creates manifests with correct names and file source loca
221
221
expect ( manifests ) . toBeDefined ( ) ;
222
222
expect ( manifests ! . length ) . toBeGreaterThan ( 0 ) ;
223
223
224
- // Ensure no manifest names have leading slashes
225
224
for ( const manifest of manifests ! ) {
226
225
expect ( manifest . name . startsWith ( '/' ) ) . toBe ( false ) ;
227
226
}
@@ -234,34 +233,15 @@ test('full action scan creates manifests with correct names and file source loca
234
233
'environment.yaml'
235
234
] ;
236
235
237
- // Create a lookup for manifests by name
238
236
const manifestsByName = manifests ! . reduce ( ( acc , manifest ) => {
239
237
acc [ manifest . name ] = manifest ;
240
238
return acc ;
241
239
} , { } as Record < string , any > ) ;
242
240
243
- // Check each expected manifest if it exists
244
241
for ( const expectedName of expectedManifestNames ) {
245
242
const manifest = manifestsByName [ expectedName ] ;
246
- if ( manifest ) {
247
- expect ( manifest . name ) . toBe ( expectedName ) ;
248
- expect ( manifest . file ?. source_location ) . toBe ( expectedName ) ;
249
- }
250
- }
251
-
252
- // Verify specific expected manifests exist with correct properties
253
- if ( manifestsByName [ 'package.json' ] ) {
254
- expect ( manifestsByName [ 'package.json' ] . name ) . toBe ( 'package.json' ) ;
255
- expect ( manifestsByName [ 'package.json' ] . file ?. source_location ) . toBe ( 'package.json' ) ;
256
- }
257
-
258
- if ( manifestsByName [ 'nested/package.json' ] ) {
259
- expect ( manifestsByName [ 'nested/package.json' ] . name ) . toBe ( 'nested/package.json' ) ;
260
- expect ( manifestsByName [ 'nested/package.json' ] . file ?. source_location ) . toBe ( 'nested/package.json' ) ;
261
- }
262
-
263
- if ( manifestsByName [ 'environment.yaml' ] ) {
264
- expect ( manifestsByName [ 'environment.yaml' ] . name ) . toBe ( 'environment.yaml' ) ;
265
- expect ( manifestsByName [ 'environment.yaml' ] . file ?. source_location ) . toBe ( 'environment.yaml' ) ;
243
+ expect ( manifest ) . toBeDefined ( ) ;
244
+ expect ( manifest . name ) . toBe ( expectedName ) ;
245
+ expect ( manifest . file ?. source_location ) . toBe ( expectedName ) ;
266
246
}
267
247
} , 15000 ) ;
0 commit comments