How to use the address.county 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 default values when graphs cannot be found and default values are provided', function (done) {
      var mock = mockObject();
      var leetMock = leet(mock);

      var args = {
        'firstName': 'Steve',
        'address.county': 'North County',
        'phoneNumber.1.areaCode': '555'
      };

      var actual = leetMock.collect(args);
      assert.lengthOf(actual, 3);
      assert.equal(actual[0], 'John');
      assert.equal(actual[1], args['address.county']);
      assert.equal(actual[2], args['phoneNumber.1.areaCode']);

      done();
    });
  });
github nicholascloud / l33teral / test / l33teral.mocha.js View on Github external
var mock = mockObject();
      var leetMock = leet(mock);

      var args = {
        'firstName': 'Steve',
        'address.county': 'North County',
        'phoneNumber.1.areaCode': '555'
      };

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

      done();
    });
  });