mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-01-31 10:31:36 +00:00
Merge pull request #329 from webtorrent/wrtc
Use wrtc for more reliable tests
This commit is contained in:
commit
e3ec9da607
@ -8,4 +8,3 @@ before_script:
|
|||||||
- if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
|
- if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
|
||||||
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6';
|
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6';
|
||||||
fi
|
fi
|
||||||
- export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start
|
|
||||||
|
@ -42,11 +42,11 @@
|
|||||||
"ws": "^7.0.0"
|
"ws": "^7.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"electron-webrtc": "^0.3.0",
|
|
||||||
"magnet-uri": "^5.1.3",
|
"magnet-uri": "^5.1.3",
|
||||||
"standard": "*",
|
"standard": "*",
|
||||||
"tape": "^4.0.0",
|
"tape": "^4.0.0",
|
||||||
"webtorrent-fixtures": "^1.3.0"
|
"webtorrent-fixtures": "^1.3.0",
|
||||||
|
"wrtc": "^0.4.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10"
|
"node": ">=10"
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
var Client = require('../')
|
var Client = require('../')
|
||||||
var common = require('./common')
|
var common = require('./common')
|
||||||
var test = require('tape')
|
var test = require('tape')
|
||||||
var electronWebrtc = require('electron-webrtc')
|
var wrtc = require('wrtc')
|
||||||
|
|
||||||
var wrtc
|
|
||||||
|
|
||||||
var infoHash = '4cb67059ed6bd08362da625b3ae77f6f4a075705'
|
var infoHash = '4cb67059ed6bd08362da625b3ae77f6f4a075705'
|
||||||
var peerId = Buffer.from('01234567890123456789')
|
var peerId = Buffer.from('01234567890123456789')
|
||||||
@ -115,11 +113,5 @@ test('evict: udp server', function (t) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
test('evict: ws server', function (t) {
|
test('evict: ws server', function (t) {
|
||||||
wrtc = electronWebrtc()
|
serverTest(t, 'ws', 'inet')
|
||||||
wrtc.electronDaemon.once('ready', function () {
|
|
||||||
serverTest(t, 'ws', 'inet')
|
|
||||||
})
|
|
||||||
t.once('end', function () {
|
|
||||||
wrtc.close()
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
var Client = require('../')
|
var Client = require('../')
|
||||||
var common = require('./common')
|
var common = require('./common')
|
||||||
var test = require('tape')
|
var test = require('tape')
|
||||||
var electronWebrtc = require('electron-webrtc')
|
var wrtc = require('wrtc')
|
||||||
|
|
||||||
var wrtc
|
|
||||||
|
|
||||||
var infoHash = '4cb67059ed6bd08362da625b3ae77f6f4a075705'
|
var infoHash = '4cb67059ed6bd08362da625b3ae77f6f4a075705'
|
||||||
var peerId = Buffer.from('01234567890123456789')
|
var peerId = Buffer.from('01234567890123456789')
|
||||||
@ -180,11 +178,5 @@ test('udp server', function (t) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
test('ws server', function (t) {
|
test('ws server', function (t) {
|
||||||
wrtc = electronWebrtc()
|
serverTest(t, 'ws', 'inet')
|
||||||
wrtc.electronDaemon.once('ready', function () {
|
|
||||||
serverTest(t, 'ws', 'inet')
|
|
||||||
})
|
|
||||||
t.once('end', function () {
|
|
||||||
wrtc.close()
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user