Skip to content

Conversation

@npaun
Copy link
Contributor

@npaun npaun commented Aug 29, 2025

This test isn't correct. In fact, both cp and cpSync have the same behaviour. filter is invoked twice, despite the comment saying it's invoked only once in cpSync.

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Aug 29, 2025
@juanarbol
Copy link
Member

Ping @nodejs/fs

Copy link
Member

@jasnell jasnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ ./node test/known_issues/test-fs-cp-filter.js 
node:internal/errors:546
      throw error;
      ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an instance of Buffer
    at join (node:path:1339:7)
    at copyDir (node:internal/fs/cp/cp-sync:164:23)
    at onDir (node:internal/fs/cp/cp-sync:136:25)
    at getStats (node:internal/fs/cp/cp-sync:68:12)
    at cpSyncFn (node:internal/fs/cp/cp-sync:58:10)
    at cpSync (node:fs:3123:3)
    at Object.<anonymous> (/home/jsnell/projects/node/node/test/known_issues/test-fs-cp-filter.js:28:1)
    at Module._compile (node:internal/modules/cjs/loader:1737:14)
    at Object..js (node:internal/modules/cjs/loader:1870:10)
    at Module.load (node:internal/modules/cjs/loader:1469:32) {
  code: 'ERR_INVALID_ARG_TYPE'
}

I think this is still relevant.

@anonrig anonrig closed this Aug 29, 2025
@codecov
Copy link

codecov bot commented Aug 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.34%. Comparing base (7178e91) to head (ba909a0).
⚠️ Report is 46 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #59682      +/-   ##
==========================================
- Coverage   89.83%   89.34%   -0.49%     
==========================================
  Files         666      667       +1     
  Lines      195337   196850    +1513     
  Branches    38353    38343      -10     
==========================================
+ Hits       175474   175884     +410     
- Misses      12323    13336    +1013     
- Partials     7540     7630      +90     

see 134 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants