[Pkg-javascript-commits] [node-browser-pack] 06/141: passing test

Bastien Roucariès rouca at moszumanska.debian.org
Thu May 4 10:23:20 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-browser-pack.

commit 16b2d2bca4d8cbb5369ed432485a03794eca5f00
Author: James Halliday <mail at substack.net>
Date:   Mon Feb 11 00:37:50 2013 -0800

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

diff --git a/test/pack.js b/test/pack.js
new file mode 100755
index 0000000..4573911
--- /dev/null
+++ b/test/pack.js
@@ -0,0 +1,28 @@
+var test = require('tape');
+var pack = require('../');
+
+test('pack', function (t) {
+    t.plan(4);
+    
+    var p = pack();
+    var src = '';
+    p.on('data', function (buf) { src += buf });
+    p.on('end', function () {
+        var r = Function(['T'], 'return ' + src)(t);
+        t.equal(r('xyz')(5), 555);
+        t.equal(r('xyz')(5), 555);
+    });
+    
+    p.end(JSON.stringify([
+        {
+            id: 'abc',
+            source: 'T.equal(require("./xyz")(3), 333)',
+            entry: true,
+            deps: { './xyz': 'xyz' }
+        },
+        {
+            id: 'xyz',
+            source: 'T.ok(true); module.exports=function(n){return n*111}'
+        }
+    ]));
+});

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-browser-pack.git



More information about the Pkg-javascript-commits mailing list