[Pkg-javascript-commits] [node-browser-pack] 16/141: non-entry files are executing, failing test
Bastien Roucariès
rouca at moszumanska.debian.org
Thu May 4 10:23:21 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 113ce38c441ef69cb9b3029f5121278b16c7e914
Author: James Halliday <mail at substack.net>
Date: Wed Feb 20 01:50:00 2013 -0800
non-entry files are executing, failing test
---
test/only_execute_entries.js | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/test/only_execute_entries.js b/test/only_execute_entries.js
new file mode 100644
index 0000000..c4c699e
--- /dev/null
+++ b/test/only_execute_entries.js
@@ -0,0 +1,26 @@
+var test = require('tape');
+var pack = require('../');
+
+test('raw', function (t) {
+ t.plan(1);
+
+ var p = pack({ raw: true });
+ var src = '';
+ p.on('data', function (buf) { src += buf });
+ p.on('end', function () {
+ var r = Function(['T'], 'return ' + src)(t);
+ });
+
+ p.write({
+ id: 'abc',
+ source: 'T.ok(true)',
+ entry: true,
+ });
+
+ p.write({
+ id: 'xyz',
+ source: 'T.fail("non-entry files should not execute")'
+ });
+
+ 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