Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'test/node/basic.js')
-rw-r--r--test/node/basic.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/node/basic.js b/test/node/basic.js
index b225b8d..6bee61c 100644
--- a/test/node/basic.js
+++ b/test/node/basic.js
@@ -3,6 +3,21 @@ var http = require('http')
var test = require('tape')
var WebTorrent = require('../../')
+test('WebTorrent.WEBRTC_SUPPORT', function (t) {
+ t.plan(2)
+
+ var client = new WebTorrent({ dht: false, tracker: false })
+
+ client.on('error', function (err) { t.fail(err) })
+ client.on('warning', function (err) { t.fail(err) })
+
+ t.equal(WebTorrent.WEBRTC_SUPPORT, false)
+
+ client.destroy(function (err) {
+ t.error(err, 'client destroyed')
+ })
+})
+
test('client.add: http url to a torrent file, string', function (t) {
t.plan(8)