[Pkg-javascript-commits] [node-module-deps] 97/444: failing streaming test

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:47:46 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-module-deps.

commit 2421fa49376e19c6faaed48377ed94ca982d260c
Author: James Halliday <mail at substack.net>
Date:   Sun Jun 9 11:12:31 2013 -0700

    failing streaming test
---
 test/stream.js | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/test/stream.js b/test/stream.js
new file mode 100644
index 0000000..1ed377d
--- /dev/null
+++ b/test/stream.js
@@ -0,0 +1,21 @@
+var parser = require('../');
+var test = require('tap').test;
+var JSONStream = require('JSONStream');
+var packer = require('browser-pack');
+var through = require('through');
+var concat = require('concat-stream');
+
+test('read from a stream', function (t) {
+    t.plan(1);
+    var tr = through();
+    var p = parser(tr);
+    
+    p.on('error', t.fail.bind(t));
+    var pack = packer();
+    
+    p.pipe(JSONStream.stringify()).pipe(pack).pipe(concat(function (src) {
+        Function(['t'],src)(t);
+    }));
+    
+    tr.queue('t.ok(true)');
+});

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-module-deps.git



More information about the Pkg-javascript-commits mailing list