[Pkg-javascript-commits] [node-module-deps] 28/444: failing transform test using sed

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:47:40 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 22876bf4603e0abd4d3f21612f5ba068b7283482
Author: James Halliday <mail at substack.net>
Date:   Tue Feb 26 16:24:54 2013 -0800

    failing transform test using sed
---
 test/tr.js | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/test/tr.js b/test/tr.js
new file mode 100644
index 0000000..4d4ed24
--- /dev/null
+++ b/test/tr.js
@@ -0,0 +1,20 @@
+var mdeps = require('../');
+var test = require('tap').test;
+var JSONStream = require('JSONStream');
+var packer = require('browser-pack');
+
+test('transform', function (t) {
+    t.plan(3);
+    var p = mdeps(__dirname + '/files/tr/main.js', {
+        transform: [ 'sed s/AAA/5/', 'sed s/BBB/50/' ]
+    });
+    var pack = packer();
+    
+    p.pipe(JSONStream.stringify()).pipe(pack);
+    
+    var src = '';
+    pack.on('data', function (buf) { src += buf });
+    pack.on('end', function () {
+        Function('t', src)(t);
+    });
+});

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