This commit is contained in:
zino
2021-03-02 00:06:38 +01:00
parent 3a8aab0e9a
commit eeb745b013
3567 changed files with 1234741 additions and 0 deletions

22
client/node_modules/read-only-stream/test/ro.js generated vendored Normal file
View File

@@ -0,0 +1,22 @@
var test = require('tape');
var readonly = require('../');
var through = require('through2');
var concat = require('concat-stream');
test('readonly', function (t) {
t.plan(2);
var stream = through();
stream.write('woo');
var ro = readonly(stream);
ro.pipe(concat(function (body) {
t.equal(body.toString('utf8'), 'woo');
}));
t.throws(function () {
ro.write('beep');
});
stream.end();
});