This commit is contained in:
Simon Priet
2021-09-05 22:53:58 +02:00
commit 9e2991e668
17888 changed files with 1263126 additions and 0 deletions

15
node_modules/read-only-stream/test/error.js generated vendored Normal file
View File

@@ -0,0 +1,15 @@
var test = require('tape');
var readonly = require('../');
var through = require('through2');
test('error', function (t) {
t.plan(1);
var stream = through();
var ro = readonly(stream);
ro.on('error', function (err) {
t.ok(err);
});
stream.emit('error', new Error);
});

22
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();
});

21
node_modules/read-only-stream/test/streams1.js generated vendored Normal file
View File

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