[Pkg-javascript-commits] [node-stream-browserify] 14/44: another passing test
Bastien Roucariès
rouca at moszumanska.debian.org
Sun Aug 13 14:18:42 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-browserify.
commit fb00ec7cb58bf0dc6ef125ac9c4ebf4738c53f96
Author: James Halliday <mail at substack.net>
Date: Thu Dec 19 18:52:12 2013 -0800
another passing test
---
test/typedarray.js | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/test/typedarray.js b/test/typedarray.js
new file mode 100644
index 0000000..706c88d
--- /dev/null
+++ b/test/typedarray.js
@@ -0,0 +1,23 @@
+var test = require('tape');
+var Transform = require('../transform.js');
+var concat = require('concat-stream');
+
+test(function (t) {
+ t.plan(1);
+
+ var stream = new Transform;
+ stream._transform = function (buf, enc, next) {
+ this.push(buf.toString('hex'));
+ next();
+ };
+
+ var xs = new Uint8Array(3);
+ xs[0] = 97, xs[1] = 98, xs[2] = 99;
+
+ stream.pipe(concat(function (body) {
+ t.equal(body.toString('utf8'), '616263');
+ }));
+
+ stream.write(xs);
+ stream.end();
+});
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-stream-browserify.git
More information about the Pkg-javascript-commits
mailing list