Repository navigation
chore: Replace mocha/expect/sinon/nyc with node:test harness - #90
Conversation
|
So I've been able to fix most tests, I'm using a promise to await before checking runs which seems like a sane choice to deal with the assert swallowing I found wish it was a bit more elegant but it isn't cludge. I removed t.plan(1) from the debounce test because I can't figure out the purpose of it originally and it always should have been 2 from my reading of the mocha the other test is showing a regression // #46 }); i'm unsure why this passed in the mocha and looks like it's related to chokidar and probably needs actual code changes and or an update to chokidar which is on 6. |
phated
left a comment
There was a problem hiding this comment.
Some changes still needed and I will think about the promise usage.
Co-authored-by: Blaine Bublitz <blaine.bublitz@gmail.com>
Co-authored-by: Blaine Bublitz <blaine.bublitz@gmail.com>
Co-authored-by: Blaine Bublitz <blaine.bublitz@gmail.com>
So the bug can be fixed if we resolve the cwd option before passing to chokidor. path.resolve(opts.cwd) What are our plans with chokidor since it changed how it worked in version 4 and beyond? Can confirm it breaks the entire library when I tried upgrading it to see if that fixed the issue. Interesting I thought resolve was doing the same as normalize-path as in the original patch from v5 but that's a brain fritz. Lucky break. Has to be something with chokidor and how it's handling changing the directory. Probably why resolve is fixing it due to it making it absolute. |
|
Your debugging here put me on the right path to discover that |
phated
left a comment
There was a problem hiding this comment.
I think this is good-to-go! It found a bunch of bugs with Chokidar 3 and globs (particularly on Windows) which is really good to highlight in the test suite for when we rewrite this library. Thanks!
Closes #89
This is not complete yet, there are some tests that seem to do nothing. I have kept them commented out so they are easily looked at
t.plan might not work the same as assertions so the first debounce test might need to be written
and #46 is happening again?