How to use the address.missing function in address

To help you get started, we’ve selected a few address examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nicholascloud / l33teral / test / l33teral.mocha.js View on Github external
it('should return undefined when graphs cannot be found', function (done) {
      var mock = mockObject();
      var leetMock = leet(mock);

      var actual = leetMock.extract('firstName', 'address.missing', 'phoneNumber.1.missing');
      assert.equal(Object.keys(actual).length, 3);
      assert.property(actual, 'firstName');
      assert.isTrue(actual.hasOwnProperty('address.missing'));
      assert.isTrue(actual.hasOwnProperty('phoneNumber.1.missing'));
      assert.equal(actual['firstName'], 'John');
      assert.equal(actual['address.missing'], undefined);
      assert.equal(actual['phoneNumber.1.missing'], undefined);

      done();
    });