Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

passing test from the example

  • Loading branch information...
commit 6457ceafdfc6fca395cd7145505e0d6deda2e32b 1 parent 5151cf9
James Halliday authored
Showing with 16 additions and 0 deletions.
  1. +16 −0 test/path.js
16 test/path.js
View
@@ -0,0 +1,16 @@
+var pathway = require('../');
+var test = require('tap').test;
+
+test('scan an array with nested elements', function (t) {
+ var xs = [
+ { x : { y : { z : 555 } } },
+ { beep : 'boop' },
+ { x : { y : { z : 444 } }, w : 4 },
+ { x : { y : 'zzz' } },
+ { x : { y : { z : 333 } } },
+ { X : { y : { z : 222 } } }
+ ];
+ var ys = pathway(xs, [ /./, /x/i, 'y', 'z' ]);
+ t.same(ys, [ 555, 444, 333, 222 ]);
+ t.end();
+});
Please sign in to comment.
Something went wrong with that request. Please try again.