Sha256: e148dc6bade363cc7dbba0d339064cfd470edabe1bc8259954ea1c572b75f336

Contents?: true

Size: 1.22 KB

Versions: 69

Compression:

Stored size: 1.22 KB

Contents

var assert = require('assert');
var eos = require('./index');

var expected = 6;
var fs = require('fs');
var net = require('net');

var ws = fs.createWriteStream('/dev/null');
eos(ws, function(err) {
	expected--;
	assert(!!err);
	if (!expected) process.exit(0);
});
ws.close();

var rs = fs.createReadStream('/dev/random');
eos(rs, function(err) {
	expected--;
	assert(!!err);
	if (!expected) process.exit(0);
});
rs.close();

var rs = fs.createReadStream(__filename);
eos(rs, function(err) {
	expected--;
	assert(!err);
	if (!expected) process.exit(0);
});
rs.pipe(fs.createWriteStream('/dev/null'));

var rs = fs.createReadStream(__filename);
eos(rs, function(err) {
	throw new Error('no go')
})();
rs.pipe(fs.createWriteStream('/dev/null'));

var socket = net.connect(50000);
eos(socket, function(err) {
	expected--;
	assert(!!err);
	if (!expected) process.exit(0);
});

var server = net.createServer(function(socket) {
	eos(socket, function() {
		expected--;
		if (!expected) process.exit(0);
	});
	socket.destroy();
}).listen(30000, function() {
	var socket = net.connect(30000);
	eos(socket, function() {
		expected--;
		if (!expected) process.exit(0);
	});
});

setTimeout(function() {
	assert(expected === 0);
	process.exit(0);
}, 1000);

Version data entries

69 entries across 69 versions & 2 rubygems

Version Path
trusty-festivity-extension-2.3.21 node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/duplexify/node_modules/end-of-stream/test.js
trusty-festivity-extension-2.3.20 node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/duplexify/node_modules/end-of-stream/test.js
trusty-festivity-extension-2.3.19 node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/duplexify/node_modules/end-of-stream/test.js
trusty-festivity-extension-2.3.18 node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/duplexify/node_modules/end-of-stream/test.js
trusty-festivity-extension-2.3.17 node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/duplexify/node_modules/end-of-stream/test.js
trusty-festivity-extension-2.3.16 node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/duplexify/node_modules/end-of-stream/test.js
trusty-festivity-extension-2.3.15 node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/duplexify/node_modules/end-of-stream/test.js
trusty-festivity-extension-2.3.14 node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/duplexify/node_modules/end-of-stream/test.js
trusty-festivity-extension-2.3.13 node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/duplexify/node_modules/end-of-stream/test.js
trusty-festivity-extension-2.3.12 node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/duplexify/node_modules/end-of-stream/test.js
trusty-festivity-extension-2.3.11g node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/duplexify/node_modules/end-of-stream/test.js
trusty-festivity-extension-2.3.10 node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/duplexify/node_modules/end-of-stream/test.js
trusty-festivity-extension-2.3.9 node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/duplexify/node_modules/end-of-stream/test.js
trusty-festivity-extension-2.3.8 node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/duplexify/node_modules/end-of-stream/test.js
trusty-festivity-extension-2.3.7 node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/duplexify/node_modules/end-of-stream/test.js
trusty-festivity-extension-2.3.6 node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/duplexify/node_modules/end-of-stream/test.js
trusty-festivity-extension-2.3.5 node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/duplexify/node_modules/end-of-stream/test.js
trusty-festivity-extension-2.3.4 node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/duplexify/node_modules/end-of-stream/test.js
trusty-festivity-extension-2.3.3 node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/duplexify/node_modules/end-of-stream/test.js
trusty-festivity-extension-2.3.2 node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/duplexify/node_modules/end-of-stream/test.js