<commit_before>'use strict';

angular.module('apiMock', ['ngMockE2E']).run(function ($httpBackend) {

  var settings = {};
  var settingsRE = /\/api\/settings\/([^\/]+)$/;

  $httpBackend.whenGET(settingsRE).respond(function (method, url) {
    var match = url.match(settingsRE);
    return [200, settings[match && match[1]] || {}];
  });

  $httpBackend.whenPUT(settingsRE).respond(function (method, url, json) {
    var match = url.match(settingsRE);
    var compId = match && match[1]; //compID = Widget ID provided by Wix
    if (compId) {
      settings[compId] = json;
      return [200, settings[compId]];
    } else {
      return [400, null];
    }
  });

  var test = $httpBackend.whenGET(/.*/);
  if (angular.isFunction(test.passThrough)) {
    test.passThrough();
  }
});<commit_msg>Made notes in API test file on how to use<commit_after>'use strict';

angular.module('apiMock', ['ngMockE2E']).run(function ($httpBackend) {

  var settings = {}; //email:"<EMAIL>"}; - put fake settings here - also use fake compID until backend ready
  var settingsRE = /\/api\/settings\/([^\/]+)$/;

  $httpBackend.whenGET(settingsRE).respond(function (method, url) {
    var match = url.match(settingsRE);
    return [200, settings[match && match[1]] || {}];
  });

  $httpBackend.whenPUT(settingsRE).respond(function (method, url, json) {
    var match = url.match(settingsRE);
    var compId = match && match[1]; //compID = Widget ID provided by Wix
    if (compId) {
      settings[compId] = json;
      return [200, settings[compId]];
    } else {
      return [400, null];
    }
  });

  var test = $httpBackend.whenGET(/.*/);
  if (angular.isFunction(test.passThrough)) {
    test.passThrough();
  }
});
{'fraction_non_alphanumeric': 0.18229777256740914, 'fraction_numerical': 0.01406799531066823, 'mean_word_length': 3.4453125, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '3589553', 'n_tokens_mistral': 581, 'n_tokens_neox': 565, 'n_words': 129}