Fix two test bugs.
This commit is contained in:
parent
921037e24c
commit
8ec8fdacb2
1 changed files with 2 additions and 2 deletions
|
@ -120,13 +120,13 @@ describe(`Channel`, function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`complains when given non-channel method promises`, function() {
|
it(`complains when given non-channel method promises`, function() {
|
||||||
assertRejects(async () => {
|
return assertRejects(async () => {
|
||||||
await Channel.select([Promise.resolve()]);
|
await Channel.select([Promise.resolve()]);
|
||||||
}, new TypeError(`Channel.select accepts only promises returned by push & shift.`));
|
}, new TypeError(`Channel.select accepts only promises returned by push & shift.`));
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`complains if not given an array`, function() {
|
it(`complains if not given an array`, function() {
|
||||||
assertRejects(async () => {
|
return assertRejects(async () => {
|
||||||
await Channel.select(Channel.of(0).shift(), Channel.of(1).shift());
|
await Channel.select(Channel.of(0).shift(), Channel.of(1).shift());
|
||||||
}, new TypeError(`Channel.select: Argument must be an array.`));
|
}, new TypeError(`Channel.select: Argument must be an array.`));
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue