[Pkg-javascript-commits] [node-subarg] 04/17: failing recursive test

Bastien Roucariès rouca at moszumanska.debian.org
Fri Aug 25 19:28:11 UTC 2017


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

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

commit e40b05082ddc41141226404d8acc38f113cbfa46
Author: James Halliday <mail at substack.net>
Date:   Sat Feb 8 20:16:29 2014 -0800

    failing recursive test
---
 test/recursive.js | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/test/recursive.js b/test/recursive.js
new file mode 100644
index 0000000..ab94c7a
--- /dev/null
+++ b/test/recursive.js
@@ -0,0 +1,24 @@
+var subarg = require('../');
+var test = require('tape');
+
+test('recursive', function (t) {
+    t.plan(1);
+    
+    t.deepEqual(
+        subarg('-a [ -b [ -c [ -d 5 ] ] ] -e 3'.split(/\s+/)),
+        {
+            _: [],
+            a: {
+                _: [],
+                b: {
+                    _: [],
+                    c: {
+                        _: [],
+                        d: 5
+                    }
+                }
+            },
+            e: 3
+        }
+    );
+});

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



More information about the Pkg-javascript-commits mailing list