[Pkg-javascript-commits] [node-browser-pack] 112/141: Add test for valid empty module

Bastien Roucariès rouca at moszumanska.debian.org
Thu May 4 10:23:29 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 d4d2632cdb869f95f7001a431c0f17dcd383e756
Author: Andres Suarez <zertosh at gmail.com>
Date:   Sat Apr 25 19:32:29 2015 -0400

    Add test for valid empty module
    
    See https://github.com/substack/browser-pack/pull/52
---
 test/empty.js | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/test/empty.js b/test/empty.js
new file mode 100644
index 0000000..e871740
--- /dev/null
+++ b/test/empty.js
@@ -0,0 +1,33 @@
+var test = require('tape');
+var pack = require('../');
+var vm = require('vm');
+
+test('empty', function (t) {
+    t.plan(1);
+    
+    var p = pack();
+    var src = '';
+    p.on('data', function (buf) { src += buf });
+    p.on('end', function () {
+        t.doesNotThrow(function() {
+            vm.runInNewContext(src, {});
+        });
+    });
+
+    p.end();
+});
+
+test('empty with standalone', function (t) {
+    t.plan(1);
+    
+    var p = pack({standalone: 'ABC'});
+    var src = '';
+    p.on('data', function (buf) { src += buf });
+    p.on('end', function () {
+        t.doesNotThrow(function() {
+            vm.runInNewContext(src, {});
+        });
+    });
+
+    p.end();
+});

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