stream-assert
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -17,3 +17,4 @@ var through = require('through2'); | ||
i++; | ||
cb(null, obj); | ||
this.emit('data', obj); | ||
cb(null); | ||
}).on('finish', function () { | ||
@@ -42,3 +43,4 @@ this.emit('end'); | ||
i++; | ||
cb(null, obj); | ||
this.emit('data', obj); | ||
cb(null); | ||
}).on('finish', function () { | ||
@@ -56,3 +58,4 @@ this.emit('end'); | ||
} catch (err) { } | ||
cb(null, obj); | ||
this.emit('data', obj); | ||
cb(null); | ||
}).on('finish', function () { | ||
@@ -70,3 +73,4 @@ if (!matched) { | ||
i++; | ||
cb(null, obj); | ||
this.emit('data', obj); | ||
cb(null); | ||
}).on('finish', function () { | ||
@@ -76,3 +80,3 @@ var assertion = expected; | ||
assertion = function (data) { | ||
if (data !== expected) throw new Error('not ' + data + ' equal ' + expected); | ||
if (data !== expected) throw new Error(data + ' not equal ' + expected); | ||
} | ||
@@ -79,0 +83,0 @@ } |
{ | ||
"name": "stream-assert", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Assertion library for streams", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# stream-assert [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][depstat-image]][depstat-url] | ||
This library under heavy development. API will significally change, be brave to pull-request your suggestions about it. | ||
### Assertion library wanted | ||
@@ -17,5 +15,5 @@ | ||
array([1, 2, 3]) | ||
.pipe(assert.first(function(data) { should.eql(1); })) | ||
.pipe(assert.second(function(data) { should.eql(2); })) | ||
.pipe(assert.nth(2, function(data) { should.eql(3); })) | ||
.pipe(assert.first(function(data) { data.should.eql(1); })) | ||
.pipe(assert.second(function(data) { data.should.eql(2); })) | ||
.pipe(assert.nth(2, function(data) { data.should.eql(3); })) | ||
.pipe(assert.length(1)) | ||
@@ -22,0 +20,0 @@ .on('end', console.log); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
81
4398
62