+ this.emittedEvents = [];
+ this.beforeCall = null;
+ this.afterCall = null;
+
+ this.changeObserver = (event) => {
+ this.emittedEvents.push(event)
+ };
+
+ this.nodeAddedObserver = ({ node }) => {
+ node.test.addEventListener('change', this.changeObserver);
+ };
+
+ this.nodeRemovedObserver = ({ node }) => {
+ node.test.removeEventListener('change', this.changeObserver);
+ };
+
+ for (const node of this.testNodes) {
+ node.test.addEventListener('change', this.changeObserver);
+ }
+
+ this.testNodes.addEventListener('nodeAdded', this.nodeAddedObserver);
+ this.testNodes.addEventListener('nodeRemoved', this.nodeRemovedObserver);
+