| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 2x 2x 2x 2x 2x 2x 2x 2x 2x | const tape = require('tape')
const Pipe = require('../')
tape('tests', t => {
const p = new Pipe(Buffer.from([1, 2, 3, 4]))
p.write(Buffer.from([99]))
t.deepEquals(p.buffer, Buffer.from([1, 2, 3, 4, 99]))
const buf = p.read(3)
t.deepEquals(buf, Buffer.from([1, 2, 3]))
t.end()
})
|