Skip to content

Commit a54c259

Browse files
committed
docs(test): update outdated socket-registry comments in path-resolve tests
Update comments to reflect that socket-registry/lib is now the standalone @socketsecurity/lib package. Clarify that tests are skipped due to mock-fs conflicts and import path issues that need fixing.
1 parent e285bb7 commit a54c259

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/cli/src/utils/fs/path-resolve.test.mts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ const __dirname = path.dirname(__filename)
5151
const rootNmPath = path.join(__dirname, '../..', NODE_MODULES)
5252
const mockFixturePath = normalizePath(path.join(__dirname, 'mock'))
5353
const mockNmPath = normalizePath(rootNmPath)
54-
// Load the registry from its actual location (socket-registry/registry)
55-
// because node_modules/@socketsecurity/registry is a symlink and require follows it
54+
// Load the registry from its actual location (socket-registry/registry).
55+
// Note: socket-registry/lib is now the standalone @socketsecurity/lib package.
5656
const actualRegistryPath = path.resolve(
5757
__dirname,
5858
'../../../socket-registry/registry',
@@ -75,9 +75,8 @@ try {
7575
}
7676

7777
function mockTestFs(config: FileSystem.DirectoryItems) {
78-
// Don't load entire node_modules to avoid ENAMETOOLONG from circular symlinks
79-
// between @socketregistry/packageurl-js and @socketsecurity/registry.
80-
// Instead, load only the registry from its actual location since require follows symlinks.
78+
// Don't load entire node_modules to avoid ENAMETOOLONG from circular symlinks.
79+
// Instead, load only the registry from its actual location.
8180
return mockFs({
8281
...config,
8382
[mockNmPath]: {},
@@ -147,7 +146,8 @@ const sortedPromise =
147146
}
148147
const sortedGetPackageFilesFullScans = sortedPromise(getPackageFilesForScan)
149148

150-
// Skipped: Test requires socket-registry as sibling directory which is not available in this environment.
149+
// Skipped: Tests use mock-fs which conflicts with loading socket-registry files,
150+
// and have import path issues that need fixing.
151151
describe.skip('Path Resolve', () => {
152152
afterEach(() => {
153153
mockFs.restore()

0 commit comments

Comments
 (0)