[Pkg-javascript-commits] [node-module-deps] 05/444: passing bundle pack test

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:47:38 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 55e35bc07440b78a769207c0d3fd0a509b31c676
Author: James Halliday <mail at substack.net>
Date:   Mon Feb 11 06:48:58 2013 -0800

    passing bundle pack test
---
 test/bundle.js | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/test/bundle.js b/test/bundle.js
new file mode 100644
index 0000000..b1605bb
--- /dev/null
+++ b/test/bundle.js
@@ -0,0 +1,20 @@
+var parser = require('../');
+var test = require('tap').test;
+var JSONStream = require('JSONStream');
+var packer = require('browser-pack');
+
+test('bundle', function (t) {
+    t.plan(1);
+    var p = parser(__dirname + '/files/main.js');
+    var pack = packer();
+    
+    p.pipe(JSONStream.stringify()).pipe(pack);
+    
+    var src = '';
+    pack.on('data', function (buf) { src += buf });
+    pack.on('end', function () {
+        Function('console', src)({
+            log: function (s) { t.equal(s, 'main: 1055') }
+        });
+    });
+});

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