Skip to content

Commit 0758889

Browse files
committed
test: using data structure in channel constructor
1 parent fa085be commit 0758889

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/channel.spec.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,16 @@ describe('Channel', function() {
5959
assert.equal(ch.buf.size, size);
6060
assert.equal(ch.transform, fn);
6161
});
62+
63+
it('should accept data structures as first parameter', async() => {
64+
let size = 8;
65+
let buf = new FixedQueue(size);
66+
let ch = new Channel(buf);
67+
assert.exists(ch.buf);
68+
assert.true(ch.buf.empty());
69+
assert.false(ch.buf.full());
70+
assert.equal(ch.buf.size, size);
71+
});
6272
});
6373

6474
describe('.from()', () => {

0 commit comments

Comments
 (0)