[Pkg-javascript-commits] [node-stream-splicer] 47/71: fixed the nested middle test

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:55:51 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 3b019a21be9b9778c217f87fd13d0e8bf806b262
Author: James Halliday <mail at substack.net>
Date:   Thu Jun 12 18:12:45 2014 -0700

    fixed the nested middle test
---
 test/nested_middle.js | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/test/nested_middle.js b/test/nested_middle.js
index b9d737c..05573a3 100644
--- a/test/nested_middle.js
+++ b/test/nested_middle.js
@@ -14,8 +14,10 @@ test('nested splicer', function (t) {
     });
     
     var stream = pipeline.obj([
-        through(function (buf, enc, next) {
-            this.push(String.fromCharCode(buf.charAt(0) + 5));
+        through.obj(function (str, enc, next) {
+            this.push(str.replace(/^./, function (c) {
+                return String.fromCharCode(c.charCodeAt(0) + 5);
+            }));
             next();
         }),
         [ split(), addNewLines ],
@@ -25,7 +27,7 @@ test('nested splicer', function (t) {
         })
     ]);
     
-    stream.get(0).unshift(through(function (buf, enc, next) {
+    stream.get(1).unshift(through(function (buf, enc, next) {
         this.push(buf.toString('utf8').toUpperCase());
         next();
     }));

-- 
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