Repository navigation
chore: Replace mocha/expect/nyc with node:test harness - #90
FotoVerite wants to merge 8 commits into
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.
|
|
||
| describe("lib/debounce", function () { | ||
| it("should call an original function with specified delay", function (done) { | ||
| expect.assertions(1); |
There was a problem hiding this comment.
This looks like the plan was 1 and it was lost
There was a problem hiding this comment.
It calls t.plan is called twice I'm confused how it would only call one. I think mocha might work different but even with done being called the assert is still counted.
|
|
||
| # Test results | ||
| test.xunit | ||
| test/lcov.info No newline at end of file |
There was a problem hiding this comment.
| test/lcov.info | |
| test/lcov.info | |
| test/fixtures/ |
Fixtures are generated during test so they should be ignored
| var normalizePath = require("normalize-path"); | ||
| var through = require("through2"); |
There was a problem hiding this comment.
| var normalizePath = require("normalize-path"); | |
| var through = require("through2"); | |
| var through = require("through2"); | |
| var normalizePath = require("normalize-path"); |
diff nit
There was a problem hiding this comment.
why normalize over through originally? Not alphabetical?
| setTimeout(changeFile, timeout * 2); | ||
| }); | ||
|
|
||
| await promise; |
There was a problem hiding this comment.
Interesting use of this. Let me think about it a bit.
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>
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?