[Pkg-javascript-commits] [node-stream-splicer] 52/71: nested get test
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Dec 15 09:55:52 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-stream-splicer.
commit 28bbcd75fc557e1d9535d43ffa089ede1b4bf07c
Author: James Halliday <mail at substack.net>
Date: Sat Jun 14 19:50:19 2014 -0700
nested get test
---
test/get.js | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/test/get.js b/test/get.js
index 2eb4977..fdb5369 100644
--- a/test/get.js
+++ b/test/get.js
@@ -22,3 +22,20 @@ test('get', function (t) {
t.equal(pipe.get(-5), undefined, '-5');
t.end();
});
+
+test('nested get', function (t) {
+ var a = through.obj();
+ var b = through.obj();
+ var c = through.obj();
+ var d = through.obj();
+ var e = through.obj();
+ var f = through.obj();
+ var g = through.obj();
+
+ var pipe = pipeline([ a, [ b, c, [ d, [ e ], f ] ], g ]);
+ t.equal(pipe.get(0), a);
+ t.equal(pipe.get(1, -1, 1, 0), e);
+ t.equal(pipe.get(1, 3), undefined);
+ t.equal(pipe.get(4, 3), undefined);
+ t.end();
+});
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-stream-splicer.git
More information about the Pkg-javascript-commits
mailing list