Channel.select: Reword error message.
This commit is contained in:
parent
b9901df29a
commit
32af6e8987
2 changed files with 2 additions and 2 deletions
|
@ -353,13 +353,13 @@ Channel.select = methodPromises =>
|
|||
await promise;
|
||||
} catch (exception) {
|
||||
reject(exception);
|
||||
`Channel.select accepts only promises returned by push & shift.`
|
||||
}
|
||||
|
||||
resolve(promise.channel);
|
||||
} catch (exception) {
|
||||
reject(
|
||||
new TypeError(
|
||||
`Channel.select accepts only Channel method promises.`
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ describe(`Channel`, function() {
|
|||
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.`));
|
||||
}, new TypeError(`Channel.select accepts only promises returned by push & shift.`));
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue