Skip to content

Commit

Permalink
test: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zkochan committed May 18, 2024
1 parent 479d4fd commit b64fe99
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/dependency-path/test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
refToRelative,
tryGetPackageId,
} from '@pnpm/dependency-path'
import { type DepPath } from '@pnpm/types'

test('isAbsolute()', () => {
expect(isAbsolute('/foo/1.0.0')).toBeFalsy()
Expand Down Expand Up @@ -87,8 +88,8 @@ test('depPathToFilename()', () => {
})

test('tryGetPackageId', () => {
expect(tryGetPackageId('/foo@1.0.0(@types/babel__core@7.1.14)')).toEqual('/foo@1.0.0')
expect(tryGetPackageId('/foo@1.0.0(@types/babel__core@7.1.14(is-odd@1.0.0))')).toEqual('/foo@1.0.0')
expect(tryGetPackageId('/@(-.-)/foo@1.0.0(@types/babel__core@7.1.14)')).toEqual('/@(-.-)/foo@1.0.0')
expect(tryGetPackageId('foo@1.0.0(patch=xxxx)(@types/babel__core@7.1.14)')).toEqual('foo@1.0.0')
expect(tryGetPackageId('/foo@1.0.0(@types/babel__core@7.1.14)' as DepPath)).toEqual('/foo@1.0.0')
expect(tryGetPackageId('/foo@1.0.0(@types/babel__core@7.1.14(is-odd@1.0.0))' as DepPath)).toEqual('/foo@1.0.0')
expect(tryGetPackageId('/@(-.-)/foo@1.0.0(@types/babel__core@7.1.14)' as DepPath)).toEqual('/@(-.-)/foo@1.0.0')
expect(tryGetPackageId('foo@1.0.0(patch=xxxx)(@types/babel__core@7.1.14)' as DepPath)).toEqual('foo@1.0.0')
})

0 comments on commit b64fe99

Please sign in to comment.