Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
468 B

  1. var test = require('tape');
  2. var traverse = require('../');
  3. test('has', function (t) {
  4. var obj = { a : 2, b : [ 4, 5, { c : 6 } ] };
  5. t.equal(traverse(obj).has([ 'b', 2, 'c' ]), true)
  6. t.equal(traverse(obj).has([ 'b', 2, 'c', 0 ]), false)
  7. t.equal(traverse(obj).has([ 'b', 2, 'd' ]), false)
  8. t.equal(traverse(obj).has([]), true)
  9. t.equal(traverse(obj).has([ 'a' ]), true)
  10. t.equal(traverse(obj).has([ 'a', 2 ]), false)
  11. t.end();
  12. });