Skip to content

Commit b4b16e4

Browse files
committed
make jshint not yell at me for writing js code executed in the browser in the file executed by node. h/t @KaptenJansson
1 parent 651f89b commit b4b16e4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/selenium/p2p.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function doJoin(driver, room) {
1010
}
1111

1212
function testP2P(browserA, browserB, t) {
13-
var room = 'testing_' + Math.floor(Math.random()*100000);
13+
var room = 'testing_' + Math.floor(Math.random() * 100000);
1414

1515
var userA = seleniumHelpers.buildDriver(browserA);
1616
doJoin(userA, room);
@@ -19,8 +19,9 @@ function testP2P(browserA, browserB, t) {
1919
doJoin(userB, room);
2020

2121
userA.wait(function () {
22-
return userA.executeScript('return webrtc.getPeers().length === 1 ' +
23-
'&& webrtc.getPeers()[0].pc.iceConnectionState === \'connected\'');
22+
return userA.executeScript(function () {
23+
return window.webrtc.getPeers().length === 1 && window.webrtc.getPeers()[0].pc.iceConnectionState === 'connected';
24+
});
2425
}, 30 * 1000)
2526
.then(function () {
2627
t.pass('P2P connected');

0 commit comments

Comments
 (0)