All files ContentNode.js

92.86% Statements 26/28
66.67% Branches 8/12
100% Functions 8/8
100% Lines 14/14
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19    1x     1x   2x   1x   44x   1x   44x   44x 44x
import { startSeparator, endSeparator } from './patterns.js';
 
export class ContentNode {
  constructor(node, index) {
    this.node = node;
    this.index = index;
  }
IEE
  cleanUp() {
    this.node.textContent = this.node.textContent.replace(startSeparator, '').replace(endSeparator, '');
  }
I
  update(newNode) {
    if (this.node.nodeValue !== newNode.node.nodeValue) {
      this.node.nodeValue = newNode.node.nodeValue;
    }
  }
}