<commit_before>describe('property()', function() {
  it('should build function for accessing property value', function() {
    var obj = {id: 10, a: 5};
    expect(property('id', 10)(obj)).toEqual(10);
  });
});<commit_msg>more unit tests for property()<commit_after>describe('property()', function() {


  it('should return function for accessing property value', function() {
    var obj = {a: 10, b: 5};
    expect(property('a')(obj)).toEqual(10);
    expect(property('b')(obj)).toEqual(5);
    expect(property('w')(obj)).toEqual(null);	
    
    var arr = [{a: 10, b: 5}, {a: 7, b: 5}, {a: 10, b: 7}, {w: 100}];
    expect(arr.map(property('a'))).toEqual([10, 7, 10, null]);
    expect(arr.filter(property('a'))).toEqual([{a: 10, b: 5}, {a: 7, b: 5}, {a: 10, b: 7}]);
  });


  it('should return function for filtering property value', function() {
    var obj = {a: 10, b: 5};
    expect(property('a', 10)(obj)).toEqual(10);
    expect(property('b', 5)(obj)).toEqual(5);
    expect(property('a', 5)(obj)).toEqual(null);
    expect(property('b', 7)(obj)).toEqual(null);
    expect(property('w', 1)(obj)).toEqual(null);
    
    var arr = [{a: 10, b: 5}, {a: 7, b: 5}, {a: 10, b: 7}, {w: 100}];
    expect(arr.map(property('a', 10))).toEqual([10, null, 10, null]);
    expect(arr.filter(property('a', 10))).toEqual([{a: 10, b: 5}, {a: 10, b: 7}]);
  });


});
{'fraction_non_alphanumeric': 0.25183553597650515, 'fraction_numerical': 0.05433186490455213, 'mean_word_length': 4.262548262548263, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4976312', 'n_tokens_mistral': 565, 'n_tokens_neox': 498, 'n_words': 127}