<commit_before>var offerUtils = (function (){
  'use strict';
  return {
    getMockOffers: function (){
      return [
      {'id': '1',
      'location': 'Asian Chef',
      'title': 'Sweet & Sour Chicken',
      'description': 'Kanafilee aedviljadega rikkalikus magushapus kastmes.',
      'price': 3.4,
      'tags': ['lind']},
      {'id': '2',
      'location': 'Bulgarian Chef',
      'title': 'Sweet & Sour Pork',
      'description': 'Seafilee aedviljadega rikkalikus magushapus kastmes.',
      'price': 3.3,
      'tags': ['siga']},
      {'id': '3',
      'location': 'Caesar Chef',
      'title': 'Sweet & Sour Beef',
      'description': 'Veisefilee aedviljadega rikkalikus magushapus kastmes.',
      'price': 3.6,
      'tags': ['loom']}
      ];
    },
    matchers: {
      toContainId: function (expected){
        var actual = this.actual;
        var notText = this.isNot ? ' not' : '';

        this.message = function(){
          return 'Expected ' + actual + notText + ' to contain id ' + expected;
        };

        return actual.some(function (elem){
          return elem.id === expected;
        });
      }
    }
  };
})();<commit_msg>add to HaveIdOrder matcher<commit_after>var offerUtils = (function (){
  'use strict';
  return {
    getMockOffers: function (){
      return [
      {'id': '1',
      'location': 'Asian Chef',
      'title': 'Sweet & Sour Chicken',
      'description': 'Kanafilee aedviljadega rikkalikus magushapus kastmes.',
      'price': 3.4,
      'tags': ['lind']},
      {'id': '2',
      'location': 'Bulgarian Chef',
      'title': 'Sweet & Sour Pork',
      'description': 'Seafilee aedviljadega rikkalikus magushapus kastmes.',
      'price': 3.3,
      'tags': ['siga']},
      {'id': '3',
      'location': 'Caesar Chef',
      'title': 'Sweet & Sour Beef',
      'description': 'Veisefilee aedviljadega rikkalikus magushapus kastmes.',
      'price': 3.6,
      'tags': ['loom']}
      ];
    },
    matchers: {
      toContainId: function (expected){
        var actual = this.actual;
        var notText = this.isNot ? ' not' : '';

        this.message = function(){
          return 'Expected ' + actual + notText + ' to contain id ' + expected;
        };

        return actual.some(function (elem){
          return elem.id === expected;
        });
      },
      toHaveIdOrder: function (expected){
        var actual = this.actual;
        var actualIds = actual.map(function (elem){
          return elem.id;
        });
        var notText = this.isNot ? ' not' : '';

        this.message = function(){
          return 'Expected offers ' + notText + ' to be ordered like: ' + expected + '. Got: ' + actualIds;
        };

        var sameLength = actual.length === expected.length;
        var sameIdOrder = expected.every(function (id, index){
          return actual[index].id === id;
        });
        return sameLength && sameIdOrder;
      }
    }
  };
})();
{'fraction_non_alphanumeric': 0.16162988115449914, 'fraction_numerical': 0.006112054329371817, 'mean_word_length': 2.177993527508091, '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': '5353878', 'n_tokens_mistral': 979, 'n_tokens_neox': 946, 'n_words': 233}