From 32af6e8987fc77a9f31c607de4551d84a4758b07 Mon Sep 17 00:00:00 2001 From: David Braun Date: Wed, 18 Oct 2017 14:51:56 -0400 Subject: [PATCH] Channel.select: Reword error message. --- lib/index.js | 2 +- test/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/index.js b/lib/index.js index b1d6426..66d5e29 100644 --- a/lib/index.js +++ b/lib/index.js @@ -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.` ) ); } diff --git a/test/index.js b/test/index.js index 0781442..3009ee2 100644 --- a/test/index.js +++ b/test/index.js @@ -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.`)); }); });