This commit is contained in:
2022-07-18 02:50:52 +00:00
parent befd344ab0
commit 06181b34d6
8569 changed files with 818704 additions and 352705 deletions
+15 -1
View File
@@ -181,7 +181,9 @@ describe("gensync({})", () => {
test("default arity", () => {
expect(
gensync({
sync: function(a, b, c, d, e, f, g){ throwTestError(); },
sync: function(a, b, c, d, e, f, g) {
throwTestError();
},
async: throwTestError,
}).length
).toBe(7);
@@ -444,6 +446,18 @@ describe("gensync.all()", () => {
syncErrback: false,
});
});
test("empty list", async () => {
const fn = gensync(function*() {
yield* gensync.all([]);
});
await expectResult(fn, undefined, {
value: undefined,
expectSync: true,
syncErrback: false,
});
});
});
describe("gensync.race()", () => {