Sha256: 3ea3a6a62b19f7ba5c27df33b1e858781c1f28f7800d541212a11eb53b5c7f0e
Contents?: true
Size: 675 Bytes
Versions: 5
Compression:
Stored size: 675 Bytes
Contents
'use strict'; const common = require('../common'); const assert = require('assert'); const StreamWrap = require('_stream_wrap'); const Duplex = require('stream').Duplex; const ShutdownWrap = process.binding('stream_wrap').ShutdownWrap; function testShutdown(callback) { var stream = new Duplex({ read: function() { }, write: function() { } }); var wrap = new StreamWrap(stream); var req = new ShutdownWrap(); req.oncomplete = function(code) { assert(code < 0); callback(); }; req.handle = wrap._handle; // Close the handle to simulate wrap.destroy(); req.handle.shutdown(req); } testShutdown(common.mustCall(function() {}));
Version data entries
5 entries across 4 versions & 1 rubygems