<commit_before>// This implements a minimum fake window object constructor that is sufficient
// to test constructing a DOM Tree for cue content.
module.exports = function FakeWindow() {
  this.DocumentFragment = function () {
    function appendChild(node) {
      this.childNodes = this.childNodes || [];
      this.childNodes.push(node);
      node.parentNode = this;
    }
    this.createElement = function(tagName) {
      return { tagName: tagName, appendChild: appendChild };
    };
    this.createTextNode = function(text) {
      return { textContent: text };
    };
    this.appendChild = appendChild;
  };
  this.ProcessingInstruction = function () {
  };
};
<commit_msg>Fix tests failing on ProcessingInstruction nodes not having proper Node interface.<commit_after>// This implements a minimum fake window object constructor that is sufficient
// to test constructing a DOM Tree for cue content.

function Node() {
  function appendChild(node) {
    this.childNodes = this.childNodes || [];
    this.childNodes.push(node);
    node.parentNode = this;
  }
  this.createElement = function(tagName) {
    return { tagName: tagName, appendChild: appendChild };
  };
  this.createTextNode = function(text) {
    return { textContent: text };
  };
  this.appendChild = appendChild;
}

module.exports = function FakeWindow() {
  this.DocumentFragment = Node;
  this.ProcessingInstruction = function() {
    return new Node();
  };
};

{'fraction_non_alphanumeric': 0.10833333333333334, 'fraction_numerical': 0.0, 'mean_word_length': 3.574603174603175, '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': '3918636', 'n_tokens_mistral': 390, 'n_tokens_neox': 389, 'n_words': 113}