Channel.select: Complain when given non-channel method promises.

This commit is contained in:
David Braun 2017-10-18 10:37:07 -04:00
parent b5c96177e4
commit a2746f6e68
2 changed files with 29 additions and 15 deletions

View file

@ -128,6 +128,12 @@ describe(`Channel`, function() {
closed
);
});
it(`complains when given non-channel method promises`, function() {
assertRejects(async () => {
await Channel.select([Promise.resolve()]);
}, new TypeError(`Channel.select accepts only Channel method promises.`));
});
});
describe(`functional interface`, async function() {