/third_party/node/test/parallel/ |
H A D | test-stream-readable-didRead.js | 8 function check(readable, data, fn) { 9 assert.strictEqual(readable.readableDidRead, false); 10 assert.strictEqual(isDisturbed(readable), false); 11 assert.strictEqual(isErrored(readable), false); 13 readable.on('error', common.mustCall(() => { 14 assert.strictEqual(isErrored(readable), true); 16 readable.on('data', common.mustNotCall()); 17 readable.on('end', common.mustNotCall()); 19 readable.on('error', common.mustNotCall()); 21 readable [all...] |
H A D | test-stream-readable-reading-readingMore.js | 7 const readable = new Readable({ 11 const state = readable._readableState; 17 readable.on('data', common.mustCall((data) => { 18 // While in a flowing state with a 'readable' listener 20 if (readable.readableFlowing) 35 readable.on('readable', common.mustCall(() => { 44 while (readable.read() !== null); 50 readable.on('end', common.mustCall(onStreamEnd)); 51 readable [all...] |
H A D | test-stream-readable-async-iterators.js | 57 const readable = new Readable({ autoDestroy: false, read() {} }); 58 readable.push('asd'); 59 readable.push('asd'); 60 readable.destroy = null; 61 readable.close = common.mustCall(() => { 62 readable.emit('close'); 66 for await (const d of readable) { 73 const readable = new Readable({ objectMode: true, read() {} }); 74 readable.push(0); 75 readable [all...] |
H A D | test-stream-readable-unshift.js | 9 const readable = new Readable({ read() {} }); 13 readable.on('data', common.mustCall((chunk) => { 18 readable.unshift(string); 24 const readable = new Readable({ read() {} }); 29 readable.on('data', common.mustCall((chunk) => { 34 readable.push(push); 35 readable.unshift(unshift); 40 const readable = new Readable({ read() {} }); 45 readable.on('data', common.mustCall((chunk) => { 49 readable [all...] |
H A D | test-stream-readable-object-multi-push-async.js | 11 const readable = new Readable({ 47 readable.on('readable', () => { 49 console.log('readable emitted'); 50 while ((data = readable.read()) !== null) { 55 readable.on('end', common.mustCall(() => { 61 const readable = new Readable({ 97 readable.on('data', (data) => { 101 readable.on('end', common.mustCall(() => { 107 const readable [all...] |
H A D | test-whatwg-webstreams-transfer.js | 82 const readable = new ReadableStream({ 107 assert.throws(() => port2.postMessage(readable), { 111 port2.postMessage(readable, [readable]); 112 assert(readable.locked); 120 // This test repeats the test above, but with a readable byte stream. 121 // Note transferring a readable byte stream results in a regular 127 const readable = new ReadableStream({ 135 assert(isReadableByteStreamController(readable[kState].controller)); 157 assert.throws(() => port2.postMessage(readable), { [all...] |
H A D | test-stream-duplex-from.js | 11 readable: new Readable({ 18 assert.strictEqual(d.readable, true); 20 d.once('readable', common.mustCall(function() { 24 assert.strictEqual(d.readable, false); 35 assert.strictEqual(d.readable, true); 37 d.once('readable', common.mustCall(function() { 41 assert.strictEqual(d.readable, false); 53 assert.strictEqual(d.readable, false); 72 assert.strictEqual(d.readable, false); 84 readable [all...] |
H A D | test-stream-readable-data.js | 6 const readable = new Readable({ 12 readable.setEncoding('utf8'); 13 readable.on('readable', read); 14 readable.removeListener('readable', read); 17 readable.on('data', common.mustCall()); 18 readable.push('hello');
|
H A D | test-stream-readable-invalid-chunk.js | 7 const readable = new stream.Readable({ 10 readable.on('error', common.expectsError({ 14 readable.push(val); 22 const readable = new stream.Readable({ 25 readable.on('error', common.expectsError({ 29 readable.unshift(val);
|
H A D | test-stream-readable-pause-and-resume.js | 44 const readable = new Readable({ 50 readable.setEncoding('utf8'); 51 readable.on('readable', read); 52 readable.removeListener('readable', read); 53 readable.pause(); 56 assert(readable.isPaused());
|
H A D | test-net-pingpong.js | 58 assert.strictEqual(socket.readable, true); 70 assert.strictEqual(socket.readable, false); 78 assert.strictEqual(socket.readable, false); 92 assert.strictEqual(client.readable, true); 103 assert.strictEqual(client.readable, true); 107 assert.strictEqual(client.readable, true);
|
H A D | test-net-socket-constructor.js | 16 function test(sock, readable, writable) { 25 assert.strictEqual(socket.readable, readable); 36 test({ handle: socket._handle, readable: true, writable: true }, 63 test({ fd: 6, readable: true, writable: true }, true, true);
|
H A D | test-stream-inheritance.js | 6 const readable = new Readable({ read() {} }); 11 assert.ok(readable instanceof Readable); 16 assert.ok(!(readable instanceof Writable)); 21 assert.ok(!(readable instanceof Duplex)); 26 assert.ok(!(readable instanceof Transform));
|
/third_party/node/test/fixtures/wpt/streams/piping/ |
H A D | pipe-through.any.js | 22 readable: new ReadableStream({ 32 return { writable: new WritableStream(), readable: new ReadableStream() }; 49 readable: new ReadableStream() 72 const readable = new ReadableStream(); 74 const result = brs.pipeThrough({ readable, writable }); 77 assert_equals(result, readable, 'return value should be the passed readable property'); 90 const readable = new ReadableStream(); 92 const result = rs.pipeThrough({ readable, writable }); 95 assert_equals(result, readable, 'retur [all...] |
H A D | multiple-propagation.any.js | 48 promise_rejects_exactly(t, error1, rs.getReader().closed, 'the readable stream must be errored with error1'), 53 }, 'Piping from an errored readable stream to an erroring writable stream'); 63 .then(ws => promise_rejects_exactly(t, error1, rs.pipeTo(ws), 'pipeTo must reject with the readable stream\'s error')) 67 return promise_rejects_exactly(t, error1, rs.getReader().closed, 'the readable stream must be errored with error1'); 69 }, 'Piping from an errored readable stream to an errored writable stream'); 84 'pipeTo must reject with the readable stream\'s error') 90 promise_rejects_exactly(t, error1, rs.getReader().closed, 'the readable stream must be errored with error1'), 95 }, 'Piping from an errored readable stream to an erroring writable stream; preventAbort = true'); 105 'pipeTo must reject with the readable stream\'s error')) 109 return promise_rejects_exactly(t, error1, rs.getReader().closed, 'the readable strea [all...] |
/third_party/node/lib/internal/streams/ |
H A D | duplexify.js | 24 const Readable = require('internal/streams/readable'); 45 if (options?.readable === false) { 46 this._readableState.readable = false; 66 return _duplexify({ readable: body }); 74 return _duplexify({ writable: false, readable: false }); 78 return _duplexify({ readable: Readable.fromWeb(body) }); 118 readable: false, 151 isReadableStream(body?.readable) && 159 typeof body?.readable === 'object' 161 const readable [all...] |
H A D | from.js | 39 const readable = new Readable({ 50 readable._read = function() { 57 readable._destroy = function(error, cb) { 89 readable.push(null); 98 } else if (readable.push(res)) { 105 readable.destroy(err); 110 return readable;
|
H A D | compose.js | 60 'must be readable', 93 } else if (!readable && !writable) { 106 const readable = !!( 120 readable, 170 const toRead = isTransformStream(tail) ? tail.readable : tail; 181 if (readable) { 183 tail.on('readable', function() { 209 const readable = isTransformStream(tail) ? tail.readable : tail; 210 const reader = readable [all...] |
H A D | pipeline.js | 56 const cleanup = eos(stream, { readable: reading, writable: writing }, (err) => { 91 Readable = require('internal/streams/readable'); 128 const cleanup = eos(writable, { readable: false }, resume); 155 async function pumpToWeb(readable, writable, finish, { end }) { 162 for await (const chunk of readable) { 201 // Need to cleanup event listeners if last stream is readable 301 ret = makeAsyncIterable(ret?.readable); 350 const toRead = ret.readable || ret; 374 const toRead = ret.readable || ret; 394 pumpToWeb(ret.readable, strea [all...] |
H A D | end-of-stream.js | 77 const readable = options.readable ?? isReadableNodeStream(stream); 94 isReadableNodeStream(stream) === readable && 108 if (willEmitClose && (!stream.readable || readable)) { 112 if (!readable || readableFinished) { 151 if (readable && !readableFinished && isReadableNodeStream(stream, true)) { 215 !readable &&
|
/third_party/node/lib/internal/webstreams/ |
H A D | transformstream.js | 185 get readable() { 188 return this[kState].readable; 203 readable: this.readable, 213 readable, 216 if (readable.locked) { 228 readable, 237 return [ this[kState].readable, this[kState].writable ]; 240 [kDeserialize]({ readable, writable }) { 241 this[kState].readable [all...] |
H A D | compression.js | 74 get readable() { 77 return this[kTransform].readable; 94 readable: this[kTransform].readable, 123 get readable() { 126 return this[kTransform].readable; 143 readable: this[kTransform].readable, 150 readable: kEnumerableProperty, 155 readable [all...] |
H A D | encoding.js | 114 get readable() { 117 return this[kTransform].readable; 135 readable: this[kTransform].readable, 201 get readable() { 204 return this[kTransform].readable; 224 readable: this[kTransform].readable, 232 readable: kEnumerableProperty, 240 readable [all...] |
H A D | adapters.js | 391 // whose readable option is false. For a Duplex that is not readable, 401 const readable = new ReadableStream(); 402 readable.cancel(); 403 return readable; 503 const readable = new Readable({ 515 readable.push(null); 517 readable.push(chunk.value); 520 (error) => destroy(readable, error)); 555 destroy(readable, erro [all...] |
/third_party/openssl/test/ |
H A D | x509_time_test.c | 486 const char *readable; member 513 const char *readable; member 543 const char *readable; in test_x509_time_print_rfc_822() local 549 readable = x509_print_tests_rfc_822[idx].readable; in test_x509_time_print_rfc_822() 551 if (rv == 0 && !TEST_str_eq(readable, "Bad time value")) { in test_x509_time_print_rfc_822() 556 || !TEST_int_eq(rv, (int)strlen(readable)) in test_x509_time_print_rfc_822() 557 || !TEST_strn_eq(pp, readable, rv)) in test_x509_time_print_rfc_822() 571 const char *readable; in test_x509_time_print_iso_8601() local 577 readable in test_x509_time_print_iso_8601() [all...] |