[Pkg-javascript-commits] [node-module-deps] 421/444: Add failing test with empty transform options with array syntax

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:48:19 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 44b3c03956914aa64aea2060aa88c96cfb6bdbc1
Author: Ben Drucker <bvdrucker at gmail.com>
Date:   Thu May 26 15:42:57 2016 -0700

    Add failing test with empty transform options with array syntax
---
 test/tr_opts.js                        |  2 +-
 test/tr_opts/main.js                   |  2 +-
 test/tr_opts/node_modules/hhh/index.js | 18 ++++++++++++++++++
 test/tr_opts/package.json              |  3 ++-
 4 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/test/tr_opts.js b/test/tr_opts.js
index cc821b9..6d2405a 100644
--- a/test/tr_opts.js
+++ b/test/tr_opts.js
@@ -15,7 +15,7 @@ test('transform options', function (t) {
     
     p.pipe(JSONStream.stringify()).pipe(pack).pipe(concat(function (src) {
         Function('console', src.toString('utf8'))({
-            log: function (msg) { t.equal(msg, 333) }
+            log: function (msg) { t.equal(msg, 999) }
         });
     }));
 });
diff --git a/test/tr_opts/main.js b/test/tr_opts/main.js
index 1f28407..d1efe1c 100644
--- a/test/tr_opts/main.js
+++ b/test/tr_opts/main.js
@@ -1 +1 @@
-console.log(FFF * GGG);
+console.log(FFF * GGG * HHH);
diff --git a/test/tr_opts/node_modules/hhh/index.js b/test/tr_opts/node_modules/hhh/index.js
new file mode 100644
index 0000000..93b1116
--- /dev/null
+++ b/test/tr_opts/node_modules/hhh/index.js
@@ -0,0 +1,18 @@
+var through = require('through2');
+
+module.exports = function (file, opts) {
+    var bufs = [];
+    return through(write, end);
+    
+    function write (buf, enc, next) {
+        if (!Buffer.isBuffer(buf)) buf = Buffer(buf);
+        bufs.push(buf);
+        next();
+    }
+    
+    function end () {
+        var str = Buffer.concat(bufs).toString('utf8');
+        this.push(str.replace(/HHH/g, 3));
+        this.push(null);
+    }
+};
diff --git a/test/tr_opts/package.json b/test/tr_opts/package.json
index 6bc52d8..51b32e9 100644
--- a/test/tr_opts/package.json
+++ b/test/tr_opts/package.json
@@ -1,6 +1,7 @@
 {
   "mdtr": [
     [ "fff", { "x": 3 } ],
-    [ "ggg", { "z": 111 } ]
+    [ "ggg", { "z": 111 } ],
+    [ "hhh" ]
   ]
 }

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