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/blocklist.js
parentd8bceb285aa84ffcd0df2346075d4cd688c4003f (diff)
stricter tests: 'warning' events are failures
Diffstat (limited to 'test/blocklist.js')
-rw-r--r--test/blocklist.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/blocklist.js b/test/blocklist.js
index bc03432..dd35fa0 100644
--- a/test/blocklist.js
+++ b/test/blocklist.js
@@ -37,6 +37,7 @@ test('blocklist (single IP)', function (t) {
blocklist: [ '1.2.3.4' ]
})
.on('error', function (err) { t.fail(err) })
+ .on('warning', function (err) { t.fail(err) })
.on('ready', function () {
client.add(leavesParsed, function (torrent) {
assertBlocked(t, torrent, '1.2.3.4:1234')
@@ -58,6 +59,7 @@ test('blocklist (array of IPs)', function (t) {
blocklist: [ '1.2.3.4', '5.6.7.8' ]
})
.on('error', function (err) { t.fail(err) })
+ .on('warning', function (err) { t.fail(err) })
.on('ready', function () {
client.add(leavesParsed, function (torrent) {
assertBlocked(t, torrent, '1.2.3.4:1234')
@@ -122,6 +124,7 @@ test('blocklist (array of IP ranges)', function (t) {
]
})
.on('error', function (err) { t.fail(err) })
+ .on('warning', function (err) { t.fail(err) })
.on('ready', function () {
client.add(leavesParsed, function (torrent) {
assertList(t, torrent)
@@ -148,6 +151,7 @@ test('blocklist (http url)', function (t) {
blocklist: url
})
.on('error', function (err) { t.fail(err) })
+ .on('warning', function (err) { t.fail(err) })
.on('ready', function () {
client.add(leavesParsed, function (torrent) {
assertList(t, torrent)
@@ -179,6 +183,7 @@ test('blocklist (http url with gzip encoding)', function (t) {
blocklist: url
})
.on('error', function (err) { t.fail(err) })
+ .on('warning', function (err) { t.fail(err) })
.on('ready', function () {
client.add(leavesParsed, function (torrent) {
assertList(t, torrent)
@@ -210,6 +215,7 @@ test('blocklist (http url with deflate encoding)', function (t) {
blocklist: url
})
.on('error', function (err) { t.fail(err) })
+ .on('warning', function (err) { t.fail(err) })
.on('ready', function () {
client.add(leavesParsed, function (torrent) {
assertList(t, torrent)
@@ -228,6 +234,7 @@ test('blocklist (fs path)', function (t) {
blocklist: blocklistPath
})
.on('error', function (err) { t.fail(err) })
+ .on('warning', function (err) { t.fail(err) })
.on('ready', function () {
client.add(leavesParsed, function (torrent) {
assertList(t, torrent)
@@ -244,6 +251,7 @@ test('blocklist (fs path with gzip)', function (t) {
blocklist: blocklistGzipPath
})
.on('error', function (err) { t.fail(err) })
+ .on('warning', function (err) { t.fail(err) })
.on('ready', function () {
client.add(leavesParsed, function (torrent) {
assertList(t, torrent)