[Pkg-javascript-commits] [node-browser-pack] 14/141: failing test for new order feature
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 45bdeab73b568d40c594b1dd32a40d81de6372bc
Author: James Halliday <mail at substack.net>
Date: Wed Feb 20 01:41:03 2013 -0800
failing test for new order feature
---
test/order.js | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/test/order.js b/test/order.js
new file mode 100644
index 0000000..867b56c
--- /dev/null
+++ b/test/order.js
@@ -0,0 +1,38 @@
+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 order = [];
+ var r = Function(['order'], 'return ' + src)(order);
+ t.same(order, [ 'abc', 'def', 'hij' ]);
+ });
+
+ p.write({
+ id: 'def',
+ order: 1,
+ entry: true,
+ source: 'order.push("def")'
+ });
+
+ p.write({
+ id: 'hij',
+ entry: true,
+ order: 2,
+ source: 'order.push("hij")'
+ });
+
+ p.write({
+ id: 'abc',
+ entry: true,
+ order: 0,
+ source: 'order.push("abc")'
+ });
+
+ 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