Michelle Bu 12 лет назад
Родитель
Сommit
2c0e3ec766
4 измененных файлов с 39 добавлено и 51 удалено
  1. 4 4
      test/adapter.js
  2. 20 14
      test/connectionmanager.js
  3. 3 21
      test/peer.js
  4. 12 12
      test/socket.js

+ 4 - 4
test/adapter.js

@@ -2,18 +2,18 @@ describe('adapter', function() {
 
   it('sets browerisms', function() {
     expect(exports.util.browserisms).to.match(/^Firefox||Webkit$/);
-  })
+  });
 
   it('sets RTCPeerConnection', function() {
     expect(RTCPeerConnection).to.be.a('function');
-  })
+  });
 
   it('sets RTCSessionDescription', function() {
     expect(RTCSessionDescription).to.be.a('function');
-  })
+  });
 
   it('sets getUserMedia', function() {
     expect(getUserMedia).to.be.a('function');
-  })
+  });
 
 });

+ 20 - 14
test/connection.js → test/connectionmanager.js

@@ -1,20 +1,18 @@
-describe('DataConnection', function() {
+describe('ConnectionManager', function() {
 
   it('constructor');
 
   it('inherits from EventEmitter');
 
-  it('initialize');
-
-  it('_setupOffer', function() {
+  it('initialize', function() {
 
   });
 
-  it('_setupDataChannel', function() {
+  it('_startPeerConnection', function() {
 
   });
 
-  it('_startPeerConnection', function() {
+  it('_processQueue', function() {
 
   });
 
@@ -22,7 +20,11 @@ describe('DataConnection', function() {
 
   });
 
-  it('_configureDataChannel', function() {
+  it('_setupNegotiationHandler', function() {
+
+  });
+
+  it('_setupDataChannel', function() {
 
   });
 
@@ -38,28 +40,32 @@ describe('DataConnection', function() {
 
   });
 
-  it('_handleDataMessage', function() {
+  it('_attachConnectionListeners', function() {
 
   });
 
-  it('close', function() {
+  it('handleSDP', function() {
 
   });
 
-  it('send', function() {
+  it('handleCandidate', function() {
 
   });
 
-  it('handleSDP', function() {
+  it('handleLeave', function() {
 
   });
 
-  it('handleCandidate', function() {
+  it('close', function() {
+
+  });
+
+  it('connect', function() {
 
   });
 
-  it('handleLeave"', function() {
+  it('update', function() {
 
   });
 
-});
+});

+ 3 - 21
test/peer.js

@@ -1,25 +1,7 @@
 describe('Peer', function() {
 
-  it('constructor')
+  it('constructor');
 
-  it('inherits from EventEmitter')
+  it('inherits from EventEmitter');
 
-  it('_getId')
-
-  it('_init')
-
-  it('_handleServerJSONMessage')
-
-  it('_processQueue')
-
-  it('_abort')
-
-  it('_cleanup')
-
-  it('_attachConnectionListeners')
-
-  it('connect')
-  
-  it('destroy')
-
-});
+});

+ 12 - 12
test/socket.js

@@ -1,23 +1,23 @@
 describe('Socket', function() {
 
-  it('constructor')
+  it('constructor');
 
-  it('inherits from EventEmitter')
+  it('inherits from EventEmitter');
 
-  it('start')
+  it('start');
 
-  it('_startWebSocket')
+  it('_startWebSocket');
 
-  it('_startXhrStream')
+  it('_startXhrStream');
 
-  it('_handleStream')
+  it('_handleStream');
 
-  it('_setHTTPTimeout')
+  it('_setHTTPTimeout');
 
-  it('send')
+  it('send');
 
-  it('close')
-  
-  it('_wsOpen')
+  it('close');
 
-});
+  it('_wsOpen');
+
+});