Skip to content

Commit 5587ec3

Browse files
committed
More path normalization for Windows
1 parent 57b3903 commit 5587ec3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/registry/packages-normalize.test.mts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
resolveOriginalPackageName,
1313
resolvePackageJsonPath,
1414
} from '../../registry/dist/lib/packages.js'
15+
import { normalizePath } from '../../registry/dist/lib/path.js'
1516
import { trash } from '../../scripts/utils/fs.mjs'
1617

1718
describe('packages normalization and reading', () => {
@@ -130,7 +131,7 @@ describe('packages normalization and reading', () => {
130131

131132
try {
132133
const resolvedPath = resolvePackageJsonPath(tmpDir)
133-
expect(resolvedPath).toBe(pkgPath)
134+
expect(resolvedPath).toBe(normalizePath(pkgPath))
134135
} finally {
135136
await trash(tmpDir)
136137
}
@@ -144,7 +145,7 @@ describe('packages normalization and reading', () => {
144145

145146
try {
146147
const resolvedPath = resolvePackageJsonPath(pkgPath)
147-
expect(resolvedPath).toBe(pkgPath)
148+
expect(resolvedPath).toBe(normalizePath(pkgPath))
148149
} finally {
149150
await trash(tmpDir)
150151
}

0 commit comments

Comments
 (0)