forked from daren.hsu/line_push
update
This commit is contained in:
+15
-1
@@ -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()", () => {
|
||||
|
||||
Reference in New Issue
Block a user