<commit_before>
var specs = exports.specs = [];

var spec =  {
  desc : "",
  methodBody : function () {},
  passed : false,
  error : ""
};

var specCase =  {
  desc : "",
  
  specs : [],
  
  beforeEachMethodBody : function () {},
  afterAllMethodBody : function () {},
  
  beforeEach : function (methodBody) {
    this.beforeEachMethodBody = methodBody;
    return this;
  },

  it : function (desc, methodBody) {
          var newSpec = Object.create(spec);
          newSpec.desc = desc;
          newSpec.methodBody = methodBody;
          this.specs.push(newSpec);
          return this;
        }, 

  afterAll : function (methodBody) {
              this.afterAllMethodBody = methodBody;
              return this;
             }
};

var describe = exports.describe = function (description) {
  var current_spec = Object.create(specCase);
  current_spec.specs = []; // clear old specs??
  current_spec.desc = description;
  specs.push(current_spec);

  return current_spec;
};




<commit_msg>fixed creation of object since my understanding of inheritance has improved<commit_after>
var specs = exports.specs = [];

var spec =  {
  desc : "",
  methodBody : function () {},
  passed : false,
  error : ""
};

var SpecCase =  function () {
  var self = this;
  self.desc = "";
  
  self.specs = [];
  
  self.beforeEachMethodBody = function () {},
  self.afterAllMethodBody = function () {},
  
  self.beforeEach = function (methodBody) {
    self.beforeEachMethodBody = methodBody;
    return self;
  },

  self.it = function (desc, methodBody) {
          var newSpec = Object.create(spec);
          newSpec.desc = desc;
          newSpec.methodBody = methodBody;
          self.specs.push(newSpec);
          return self;
        }, 

  self.afterAll = function (methodBody) {
              self.afterAllMethodBody = methodBody;
              return self;
             }
};

var describe = exports.describe = function (description) {
  var current_spec = new SpecCase();
  current_spec.desc = description;
  specs.push(current_spec);

  return current_spec;
};





{'fraction_non_alphanumeric': 0.12073112073112073, 'fraction_numerical': 0.0, 'mean_word_length': 2.466666666666667, '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': '1241646', 'n_tokens_mistral': 634, 'n_tokens_neox': 612, 'n_words': 141}