@@ -771,8 +771,7 @@ describe('PackageURL', () => {
771771 const isBuiltin = npmBuiltinNames . includes ( id )
772772 const isMixedCased = / [ A - Z ] / . test ( id )
773773 const containsIllegalCharacters = / [ ~ ' ! ( ) * ] / . test ( id )
774- expect (
775- isBuiltin || isMixedCased || containsIllegalCharacters ,
774+ expect ( isBuiltin || isMixedCased || containsIllegalCharacters ,
776775 `assert for ${ legacyName } ` ,
777776 )
778777 }
@@ -1572,7 +1571,8 @@ describe('PackageURL', () => {
15721571 // Test npm type edge cases with long names
15731572 it ( 'should validate npm namespace+name length limit' , ( ) => {
15741573 const namespace = '@' + 'a' . repeat ( 100 )
1575- const name = 'b' . repeat ( 115 ) // This makes namespace + name > 214 chars
1574+ // This makes namespace + name > 214 chars
1575+ const name = 'b' . repeat ( 115 )
15761576
15771577 expect ( ( ) => new PackageURL ( 'npm' , namespace , name , '1.0.0' ) ) . toThrow (
15781578 / n p m " n a m e s p a c e " a n d " n a m e " c o m p o n e n t s c a n n o t c o l l e c t i v e l y b e m o r e t h a n 2 1 4 c h a r a c t e r s / ,
@@ -1924,7 +1924,8 @@ describe('PackageURL', () => {
19241924 name : 'パッケージ' ,
19251925 expectedError :
19261926 / n p m " n a m e " c o m p o n e n t c a n o n l y c o n t a i n U R L - f r i e n d l y c h a r a c t e r s / ,
1927- } , // Non-ASCII characters
1927+ // Non-ASCII characters
1928+ } ,
19281929 ]
19291930
19301931 testCases . forEach ( ( { expectedError, name } ) => {
@@ -1947,7 +1948,8 @@ describe('PackageURL', () => {
19471948 ]
19481949 validNames . forEach ( name => {
19491950 const comp = { namespace : '' , name }
1950- const result = PurlType . npm . validate ( comp , true ) // Should not throw
1951+ // Should not throw
1952+ const result = PurlType . npm . validate ( comp , true )
19511953 expect ( result ) . toBe ( true )
19521954 } )
19531955 } )
@@ -2491,7 +2493,8 @@ describe('PackageURL', () => {
24912493 expect ( result1 ) . toBe ( 'Invalid purl: a' )
24922494
24932495 // Test character just outside range
2494- const result2 = formatPurlErrorMessage ( '[' ) // Character after Z
2496+ // Character after Z
2497+ const result2 = formatPurlErrorMessage ( '[' )
24952498 expect ( result2 ) . toBe ( 'Invalid purl: [' )
24962499 } )
24972500
@@ -2625,10 +2628,12 @@ describe('PackageURL', () => {
26252628 )
26262629 expect ( formatPurlErrorMessage ( '[ message' ) ) . toBe (
26272630 'Invalid purl: [ message' ,
2628- ) // After Z
2631+ // After Z
2632+ )
26292633 expect ( formatPurlErrorMessage ( '@ message' ) ) . toBe (
26302634 'Invalid purl: @ message' ,
2631- ) // Before A
2635+ // Before A
2636+ )
26322637
26332638 // Test normalize.js line 7 - namespace filter
26342639 // Import already at top of file
@@ -2842,10 +2847,14 @@ describe('PackageURL', () => {
28422847
28432848 const frozen = recursiveFreeze ( arr )
28442849 expect ( Object . isFrozen ( frozen ) ) . toBe ( true )
2845- expect ( Object . isFrozen ( frozen [ 0 ] ) ) . toBe ( true ) // func1
2846- expect ( Object . isFrozen ( frozen [ 1 ] ) ) . toBe ( true ) // object containing func2
2847- expect ( Object . isFrozen ( frozen [ 2 ] ) ) . toBe ( true ) // func2
2848- expect ( Object . isFrozen ( frozen [ 2 ] . nested ) ) . toBe ( true ) // func2's nested object
2850+ // func1
2851+ expect ( Object . isFrozen ( frozen [ 0 ] ) ) . toBe ( true )
2852+ // object containing func2
2853+ expect ( Object . isFrozen ( frozen [ 1 ] ) ) . toBe ( true )
2854+ // func2
2855+ expect ( Object . isFrozen ( frozen [ 2 ] ) ) . toBe ( true )
2856+ // func2's nested object
2857+ expect ( Object . isFrozen ( frozen [ 2 ] . nested ) ) . toBe ( true )
28492858 } )
28502859
28512860 it ( 'should handle purl with type but no slash' , ( ) => {
0 commit comments