Skip to content

Commit 145eb18

Browse files
committed
Lint nits
1 parent 4e29dba commit 145eb18

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

test/package-url.test.mts

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,9 @@ describe('PackageURL', () => {
513513
})
514514

515515
it('should parse complex purl without pkg: prefix', () => {
516-
const purl = PackageURL.fromString('maven/com.fasterxml.jackson.core/[email protected]?classifier=sources#META-INF/MANIFEST.MF')
516+
const purl = PackageURL.fromString(
517+
'maven/com.fasterxml.jackson.core/[email protected]?classifier=sources#META-INF/MANIFEST.MF',
518+
)
517519
expect(purl.type).toBe('maven')
518520
expect(purl.namespace).toBe('com.fasterxml.jackson.core')
519521
expect(purl.name).toBe('jackson-databind')
@@ -523,7 +525,9 @@ describe('PackageURL', () => {
523525
classifier: 'sources',
524526
})
525527
expect(purl.subpath).toBe('META-INF/MANIFEST.MF')
526-
expect(purl.toString()).toBe('pkg:maven/com.fasterxml.jackson.core/[email protected]?classifier=sources#META-INF/MANIFEST.MF')
528+
expect(purl.toString()).toBe(
529+
'pkg:maven/com.fasterxml.jackson.core/[email protected]?classifier=sources#META-INF/MANIFEST.MF',
530+
)
527531
})
528532

529533
it('should parse various package types without pkg: prefix', () => {
@@ -549,7 +553,9 @@ describe('PackageURL', () => {
549553
})
550554

551555
it('should handle encoded components without pkg: prefix', () => {
552-
const purl = PackageURL.fromString('type/name%23space/na%23me@ver%23sion?foo=bar%23baz#sub%23path')
556+
const purl = PackageURL.fromString(
557+
'type/name%23space/na%23me@ver%23sion?foo=bar%23baz#sub%23path',
558+
)
553559
expect(purl.type).toBe('type')
554560
expect(purl.namespace).toBe('name#space')
555561
expect(purl.name).toBe('na#me')
@@ -559,12 +565,16 @@ describe('PackageURL', () => {
559565
foo: 'bar#baz',
560566
})
561567
expect(purl.subpath).toBe('sub#path')
562-
expect(purl.toString()).toBe('pkg:type/name%23space/na%23me@ver%23sion?foo=bar%23baz#sub%23path')
568+
expect(purl.toString()).toBe(
569+
'pkg:type/name%23space/na%23me@ver%23sion?foo=bar%23baz#sub%23path',
570+
)
563571
})
564572

565573
it('should handle edge cases without pkg: prefix', () => {
566574
// Type only (doesn't look like purl pattern, so should fail with missing pkg scheme)
567-
expect(() => PackageURL.fromString('type')).toThrow(/missing required "pkg" scheme/)
575+
expect(() => PackageURL.fromString('type')).toThrow(
576+
/missing required "pkg" scheme/,
577+
)
568578

569579
// Empty string (should still fail)
570580
expect(() => PackageURL.fromString('')).toThrow()

0 commit comments

Comments
 (0)