Sha256: 1ad684c31a7e505920a0f26205bb01f346c8284e0ad16146cea8dfd03458d7fa
Contents?: true
Size: 452 Bytes
Versions: 6
Compression:
Stored size: 452 Bytes
Contents
var test = require('tape') var through = require('../') // must emit end before close. test('end before close', function (assert) { var ts = through() var ended = false, closed = false ts.on('end', function () { assert.ok(!closed) ended = true }) ts.on('close', function () { assert.ok(ended) closed = true }) ts.write(1) ts.write(2) ts.write(3) ts.end() assert.ok(ended) assert.ok(closed) assert.end() })
Version data entries
6 entries across 4 versions & 2 rubygems