@@ -42,11 +42,6 @@ describe('PackageURLBuilder', () => {
4242 expect ( purl . version ) . toBeUndefined ( )
4343 expect ( purl . qualifiers ) . toBeUndefined ( )
4444 expect ( purl . subpath ) . toBeUndefined ( )
45- // Verify it has PackageURL methods
46- expect ( typeof purl . toString ) . toBe ( 'function' )
47- expect ( purl . toString ( ) ) . toBe ( 'pkg:npm/lodash' )
48- expect ( typeof purl . toJSON ) . toBe ( 'function' )
49- expect ( typeof purl . toObject ) . toBe ( 'function' )
5045 } )
5146
5247 it ( 'should build a complete PackageURL with all fields' , ( ) => {
@@ -278,24 +273,4 @@ describe('PackageURLBuilder', () => {
278273 } ) . toThrow ( )
279274 } )
280275 } )
281-
282- describe ( 'toString integration' , ( ) => {
283- it ( 'should produce valid purl strings' , ( ) => {
284- const purl = PackageURLBuilder . npm ( )
285- . namespace ( '@types' )
286- . name ( 'node' )
287- . version ( '16.11.7' )
288- . qualifier ( 'arch' , 'x64' )
289- . subpath ( 'lib/fs.d.ts' )
290- . build ( )
291-
292- const purlString = purl . toString ( )
293- expect ( purlString ) . toContain ( 'pkg:npm/' )
294- expect ( purlString ) . toContain ( '%40types/' )
295- expect ( purlString ) . toContain ( 'node@' )
296- expect ( purlString ) . toContain ( '16.11.7' )
297- expect ( purlString ) . toContain ( 'arch=x64' )
298- expect ( purlString ) . toContain ( '#lib/fs.d.ts' )
299- } )
300- } )
301276} )
0 commit comments