Permalink
Browse files

failing test for array regex

  • Loading branch information...
1 parent efa7355 commit 42f72c17ca84ff6f006260319a7d4d9a5e910016 @substack committed Jul 13, 2013
Showing with 9 additions and 0 deletions.
  1. +9 −0 test/array_re.js
View
@@ -0,0 +1,9 @@
+var pathway = require('../');
+var test = require('tap').test;
+
+test('array regexp', function (t) {
+ var obj = { rows : [ { xx: 52 }, { xxx: 41 }, { y: 12 }, { z: 50 } ] };
+ var xs = pathway(obj, [ 'rows', true, [/x/,'z'] ]);
+ t.deepEqual(xs, [ 52, 41, 50 ]);
+ t.end();
+});

0 comments on commit 42f72c1

Please sign in to comment.