spec/providers/transport/transport.webrtc.unit.spec.js
function() {
        var iface = testUtil.mockIface([
          ["setup", undefined],
          ["send", undefined],
          ["openDataChannel", undefined],
          ["close", undefined],
          ["getBufferedAmount", 0]
        ]);
        peerconnection = iface();
        makeEventTarget(peerconnection);
        return peerconnection;
      }
function() {
        var iface = testUtil.mockIface([
          ["setup", undefined],
          ["send", undefined],
          ["openDataChannel", undefined],
          ["close", undefined],
          ["getBufferedAmount", 0]
        ]);
        peerconnection = iface();
        makeEventTarget(peerconnection);
        return peerconnection;
      }
function ( ) { var iface = testUtil . mockIface ( [ [ "setup" , undefined ] , [ "send" , undefined ] , [ "openDataChannel" , undefined ] , [ "close" , undefined ] , [ "getBufferedAmount" , 0 ] ] ) ; peerconnection = iface ( ) ; makeEventTarget ( peerconnection ) ; return peerconnection ; }
We can't use mockIface alone, we need to make peerconnection an event target.
We can t use mockIface alone we need to make peerconnection an event target .