fix: replace vacuous symlink assertion with explicit undefined check #43

Merged
FO
5mo ago
+2-5

Closes #43

Fixes CodeRabbit finding from PR #42: the symlink test had a misleading comment and vacuous if (link) check. Since the implementation skips symlinks entirely, the assertion never executed. Replaced with explicit expect(link).toBeUndefined().


Summary by cubic

Update tests/file-tree.test.ts to assert that directory symlinks are skipped entirely. Replaces the vacuous if (link) block with expect(link).toBeUndefined() to match the tool’s behavior and prevent misleading passes.

Summary by CodeRabbit

  • Bug Fixes
    • Improved file tree handling of symlinked directories to prevent potential cycles. Symlink entries are now properly skipped during directory traversal.