Repository navigation
chore: Replace mocha/expect/nyc with node:test harness - #42
FotoVerite wants to merge 1 commit into
Conversation
| setTimeout(function () { | ||
| expect("slow function should not be called").toEqual(undefined); | ||
| done(null, 2); | ||
| assert.fail("slow function should not be called"); |
There was a problem hiding this comment.
Does this actually log as a failure if this assert.fail is reached? Because bach will catch all the errors thrown and would propagate it to the callback.
There was a problem hiding this comment.
Perhaps we just use the cb(null, 2) and comment that it should not show up in the output.
There was a problem hiding this comment.
I just noticed that is exactly what the same test in test/series.js does, so we should just standardize.
There was a problem hiding this comment.
I agree on standard, you pointed out in gulpjs/now-and-later#25 that node pattern was assert.fail I think that makes the most sense for surfacing an assert that shouldn't be called
|
|
||
| it("should execute functions in series, passing error", function (done) { | ||
| it("should execute functions in series, passing error", function (t, done) { | ||
| function slowFn(done) { |
There was a problem hiding this comment.
name this done to cb for clarity
| it("should execute functions in series, passing error", function (t, done) { | ||
| function slowFn(done) { | ||
| setTimeout(function () { | ||
| done(null, 2); |
| function slowFn(done) { | ||
| setTimeout(function () { | ||
| done(null, 2); |
| function slowFn(done) { | ||
| setTimeout(function () { | ||
| done(null, 2); |
Closes #41