code: function() {
          var iface = testUtil.mockIface([
            ["setup", undefined],
            ["send", undefined],
            ["openDataChannel", undefined],
            ["close", undefined],
            ["getBufferedAmount", 0]
          ]);
          peerconnection = iface();
          makeEventTarget(peerconnection);
          return peerconnection;
        }
docs: We can't use mockIface alone, we need to make peerconnection an event target.