mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
test: ensure assertions are reached on more tests
PR-URL: https://github.com/nodejs/node/pull/60759 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
57 files changed
+246
-286
No files matched your search
@@ -20,7 +20,7 @@
|
||||
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
'use strict';
|
||||
require('../common');
|
||||
const common = require('../common');
|
||||
const assert = require('assert');
|
||||
|
||||
const implementations = [
|
||||
@@ -40,16 +40,16 @@ function test(scheduleMicrotask) {
|
||||
let nextTickCalled = false;
|
||||
expected++;
|
||||
|
||||
scheduleMicrotask(function() {
|
||||
scheduleMicrotask(common.mustCall(() => {
|
||||
process.nextTick(function() {
|
||||
nextTickCalled = true;
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
setTimeout(common.mustCall(() => {
|
||||
assert(nextTickCalled);
|
||||
done++;
|
||||
}, 0);
|
||||
});
|
||||
}), 0);
|
||||
}));
|
||||
}
|
||||
|
||||
// first tick case
|
||||
|
||||
Reference in new issue
Block a user