Channel.select: Complain when given non-channel method promises.
This commit is contained in:
parent
b5c96177e4
commit
a2746f6e68
2 changed files with 29 additions and 15 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue