[Pkg-javascript-commits] [node-module-deps] 280/444: test to check for transform error file names

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:48:05 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 33dde928cd4ff1e6308dc0eea3d983be73c49bb8
Author: James Halliday <mail at substack.net>
Date:   Thu Jul 24 00:42:11 2014 -0700

    test to check for transform error file names
---
 test/tr_err.js | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/test/tr_err.js b/test/tr_err.js
new file mode 100644
index 0000000..842eec2
--- /dev/null
+++ b/test/tr_err.js
@@ -0,0 +1,20 @@
+var mdeps = require('../');
+var test = require('tape');
+var JSONStream = require('JSONStream');
+var packer = require('browser-pack');
+var through = require('through');
+
+test('transform', function (t) {
+    t.plan(1);
+    var p = mdeps({
+        transform: function (file) {
+            return through(function () {
+                this.emit('error', new Error('rawr'));
+            });
+        }
+    });
+    p.on('error', function (err) {
+        t.ok(/tr_sh\/main\.js/.test(err));
+    });
+    p.end(__dirname + '/files/tr_sh/main.js');
+});

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