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;
|
await promise;
|
||||||
} catch (exception) {
|
} catch (exception) {
|
||||||
reject(exception);
|
reject(exception);
|
||||||
|
`Channel.select accepts only promises returned by push & shift.`
|
||||||
}
|
}
|
||||||
|
|
||||||
resolve(promise.channel);
|
resolve(promise.channel);
|
||||||
} catch (exception) {
|
} catch (exception) {
|
||||||
reject(
|
reject(
|
||||||
new TypeError(
|
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() {
|
it(`complains when given non-channel method promises`, function() {
|
||||||
assertRejects(async () => {
|
assertRejects(async () => {
|
||||||
await Channel.select([Promise.resolve()]);
|
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