Channel.select test: Simplify.
This commit is contained in:
parent
1b1192c0e7
commit
b5c96177e4
1 changed files with 5 additions and 3 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue