Channel.select test: Simplify.

This commit is contained in:
David Braun 2017-10-18 10:36:33 -04:00
parent 1b1192c0e7
commit b5c96177e4

View file

@ -99,10 +99,12 @@ describe(`Channel`, function() {
it(`allows for non-blocking selects`, async function() { it(`allows for non-blocking selects`, async function() {
const a = Channel(); const a = Channel();
const b = Channel(); const b = Channel();
const nonBlocking = Channel();
nonBlocking.close();
switch (await Channel.select([a.shift(), b.push(0), nonBlocking.shift()])) { switch (await Channel.select([
a.shift(),
b.push(0),
Channel.of().shift()
])) {
case a: case a:
assert(false); assert(false);
break; break;