Permalink
Browse files

Accessing to module namespace instead of Javascript files

  • Loading branch information...
1 parent 53a2ebc commit b54febfa4fab6f839a6387d09434e283fa8769f8 @piranna piranna committed Feb 15, 2014
Showing with 25 additions and 8 deletions.
  1. +1 −1 examples/bridge.js
  2. +1 −1 examples/streamtest/webbridge.js
  3. +1 −1 examples/test.js
  4. +10 −2 test/connect.js
  5. +5 −1 test/create-offer.js
  6. +7 −2 test/sessiondesc.js
View
@@ -1,5 +1,5 @@
var http = require('http');
-var webrtc = require('../lib/index');
+var webrtc = require('..');
var ws = require('ws');
var MAX_REQUEST_LENGHT = 1024;
@@ -1,7 +1,7 @@
var http = require('http');
var path = require('path');
-var webrtc = require('../../lib/index');
+var webrtc = require('../..');
var express = require('express');
var socketio = require('socket.io');
View
@@ -1,4 +1,4 @@
-var RTCPeerConnection = require('../lib/index').RTCPeerConnection;
+var RTCPeerConnection = require('..').RTCPeerConnection;
var pc = new RTCPeerConnection({
View
@@ -1,14 +1,22 @@
var test = require('tape');
+
// var detect = require('rtc-core/detect');
// var RTCPeerConnection = detect('RTCPeerConnection');
-var RTCPeerConnection = require('../lib/peerconnection');
-var RTCIceCandidate = require('../lib/icecandidate');
+
+var wrtc = require('..');
+
+var RTCIceCandidate = wrtc.RTCIceCandidate;
+var RTCPeerConnection = wrtc.RTCPeerConnection;
+
var captureCandidates = require('./helpers/capture-candidates');
+
+
var peers = [];
var candidates = [ [], [] ];
var dcs = [];
var localDesc;
+
test('create the peer connections', function(t) {
t.plan(2);
peers = [
@@ -1,8 +1,12 @@
var test = require('tape');
-var RTCPeerConnection = require('../lib/peerconnection');
+
+var RTCPeerConnection = require('..').RTCPeerConnection;
+
+
var peer;
var localDesc;
+
test('create a peer connection', function(t) {
t.plan(1);
peer = new RTCPeerConnection({ iceServers: [] });
View
@@ -1,9 +1,14 @@
var test = require('tape');
-var RTCPeerConnection = require('../lib/peerconnection');
-var RTCSessionDescription = require('../lib/sessiondescription');
+
+var wrtc = require('..');
+
+var RTCPeerConnection = wrtc.RTCPeerConnection;
+var RTCSessionDescription = wrtc.RTCSessionDescription;
+
var peer;
var localDesc;
+
test('create a peer connection', function(t) {
t.plan(1);
peer = new RTCPeerConnection({ iceServers: [] });

0 comments on commit b54febf

Please sign in to comment.