Closed ghost closed 8 years ago
Isn't easier and less confusing if there is no state - hooks - that done is the second arg?
// no hooks suite.test('should pass', (t, state, done) => { return new Promise(resolve => { t.pass(); resolve(); }).then(done); }); // Less confusing would be ( now this throws undefined) suite.test('should pass', (t, done) => { return new Promise(resolve => { t.pass(); resolve(); }).then(done); });
And as you may notice in the example above, the done() callback are invoked AFTER the promise are resolved. Is that normal? No errors thrown.
Or should both Promise.resolve and done() be used together?
Closing this. Has been solved I guess?
Isn't easier and less confusing if there is no state - hooks - that done is the second arg?
And as you may notice in the example above, the done() callback are invoked AFTER the promise are resolved. Is that normal? No errors thrown.
Or should both Promise.resolve and done() be used together?