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:
authorFeross Aboukhadijeh <feross@feross.org>2015-07-27 03:14:49 +0300
committerFeross Aboukhadijeh <feross@feross.org>2015-07-27 03:14:49 +0300
commit66ab7d24251a9c2816beca2fc17d9a1785427a49 (patch)
treebbfe3b75e720b352083483f58dfca7d156102bf6 /test/download-tracker-torrent.js
parentd8bceb285aa84ffcd0df2346075d4cd688c4003f (diff)
stricter tests: 'warning' events are failures
Diffstat (limited to 'test/download-tracker-torrent.js')
-rw-r--r--test/download-tracker-torrent.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/download-tracker-torrent.js b/test/download-tracker-torrent.js
index 415c112..3c9a8be 100644
--- a/test/download-tracker-torrent.js
+++ b/test/download-tracker-torrent.js
@@ -29,9 +29,8 @@ function torrentDownloadTest (t, serverType) {
serverType === 'udp' ? { http: false } : { udp: false }
)
- tracker.on('error', function (err) {
- t.fail(err)
- })
+ tracker.on('error', function (err) { t.fail(err) })
+ tracker.on('warning', function (err) { t.fail(err) })
tracker.on('start', function () {
trackerStartCount += 1
@@ -53,6 +52,7 @@ function torrentDownloadTest (t, serverType) {
client1: ['tracker', function (cb) {
var client1 = new WebTorrent({ dht: false })
client1.on('error', function (err) { t.fail(err) })
+ client1.on('warning', function (err) { t.fail(err) })
client1.add(leavesParsed)
@@ -75,6 +75,7 @@ function torrentDownloadTest (t, serverType) {
client2: ['client1', function (cb) {
var client2 = new WebTorrent({ dht: false })
client2.on('error', function (err) { t.fail(err) })
+ client2.on('warning', function (err) { t.fail(err) })
client2.add(leavesParsed)