Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing unit tests on clean master #1306

Closed
samuelneff opened this issue Feb 14, 2024 · 5 comments
Closed

Failing unit tests on clean master #1306

samuelneff opened this issue Feb 14, 2024 · 5 comments

Comments

@samuelneff
Copy link

Describe the bug

I cloned the project and ran npm run test on master and received the below errors.

  • Chokidar 3.6.0 #7c50e25d10a497ce4409f6e52eb630f0d7647b97
  • Node v18.19.1
  • macOS 14.2.1

To Reproduce:

git clone https://github.com/paulmillr/chokidar
cd chokidar
npm i
npm run test

Expected behavior
Tests should pass, right?

Additional context

Test output, trimmed. I'll attach the full results as a file.
chokidar-unit-test-failure.txt

  6 failing

  1) chokidar
       fsevents (native extension)
         watch symlinks
           should survive ENOENT for missing symlinks when followSymlinks:false:
     AssertionError: expected spy to have been called exactly twice, but it was called thrice
    spy('addDir', '/Users/samuelneff/projects/chokidar/test-fixtures/49/subdir', ...) at FSWatcher.emit (node:events:517:28)
    spy('add', '/Users/samuelneff/projects/chokidar/test-fixtures/49/subdir/add.txt', ...) at FSWatcher.emit (node:events:517:28)
    spy('add', '/Users/samuelneff/projects/chokidar/test-fixtures/49/subdir/broken', ...) at FSWatcher.emit (node:events:517:28)
      at Context.<anonymous> (test.js:1200:28)

  2) chokidar
       fsevents (native extension)
         watch symlinks
           should watch symlinks within a watched dir as files when followSymlinks:false:
     AssertionError: expected spy to not have been called with arguments 'add', '/Users/samuelneff/projects/chokidar/test-fixtures/50/link/add.txt'
      at Context.<anonymous> (test.js:1220:32)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

  3) chokidar
       fsevents (native extension)
         reproduction of bug in issue #1024
           should detect changes to symlink folders, even if they were deleted before:

      AssertionError: expected [ …(2) ] to deeply equal [ …(5) ]
      + expected - actual

       [
         "[ALL] addDir: test-fixtures/110/test-link"
         "[ALL] addDir: test-fixtures/110/test-link/dir"
      +  "[ALL] unlinkDir: test-fixtures/110/test-link/dir"
      +  "[ALL] addDir: test-fixtures/110/test-link/dir"
      +  "[ALL] add: test-fixtures/110/test-link/dir/file"
       ]
      
      at Context.<anonymous> (test.js:2182:21)

  4) chokidar
       fs.watch (non-polling)
         watch individual files
           should detect safe-edit:
     AssertionError: expected spy to have been called exactly thrice, but it was called once
    spy('change', '/Users/samuelneff/projects/chokidar/test-fixtures/138/change.txt', ...)
      at Context.<anonymous> (test.js:637:57)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

  5) chokidar
       fs.watch (non-polling)
         reproduction of bug in issue #1024
           should detect changes to symlink folders, even if they were deleted before:

      AssertionError: expected [ …(2) ] to deeply equal [ …(5) ]
      + expected - actual

       [
         "[ALL] addDir: test-fixtures/223/test-link"
         "[ALL] addDir: test-fixtures/223/test-link/dir"
      +  "[ALL] unlinkDir: test-fixtures/223/test-link/dir"
      +  "[ALL] addDir: test-fixtures/223/test-link/dir"
      +  "[ALL] add: test-fixtures/223/test-link/dir/file"
       ]
      
      at Context.<anonymous> (test.js:2182:21)

  6) chokidar
       fs.watchFile (polling)
         reproduction of bug in issue #1024
           should detect changes to symlink folders, even if they were deleted before:

      AssertionError: expected [ …(2) ] to deeply equal [ …(5) ]
      + expected - actual

       [
         "[ALL] addDir: test-fixtures/336/test-link"
         "[ALL] addDir: test-fixtures/336/test-link/dir"
      +  "[ALL] unlinkDir: test-fixtures/336/test-link/dir"
      +  "[ALL] addDir: test-fixtures/336/test-link/dir"
      +  "[ALL] add: test-fixtures/336/test-link/dir/file"
       ]
      
      at Context.<anonymous> (test.js:2182:21)

I'm looking at the tests now to see if I can resolve them. Are they expected to pass on master right now?

@paulmillr
Copy link
Owner

no, they are expected to fail

@paulmillr paulmillr closed this as not planned Won't fix, can't repro, duplicate, stale Feb 14, 2024
@samuelneff
Copy link
Author

Thanks for confirming.

@paulmillr
Copy link
Owner

#1305

@samuelneff
Copy link
Author

@paulmillr Are they expected to fail in that they were designed that way or in that they are not working right now? Should I look into addressing them? The failures seem a bit inconsistent--some tests fail intermittently.

@paulmillr
Copy link
Owner

They should not fail.

#413, #923, #1006

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants