Skip to content

Commit 1681474

Browse files
committed
fail client tests on warning
1 parent 9f64ec6 commit 1681474

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/client.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ test('http: client.start()', function (t) {
4545
t.error(err)
4646
})
4747

48+
client.on('warning', function (err) {
49+
t.error(err)
50+
})
51+
4852
client.once('update', function (data) {
4953
t.equal(data.announce, announceUrl)
5054
t.equal(typeof data.complete, 'number')
@@ -76,6 +80,10 @@ test('http: client.stop()', function (t) {
7680
t.error(err)
7781
})
7882

83+
client.on('warning', function (err) {
84+
t.error(err)
85+
})
86+
7987
client.start()
8088

8189
setTimeout(function () {
@@ -106,6 +114,10 @@ test('http: client.update()', function (t) {
106114
t.error(err)
107115
})
108116

117+
client.on('warning', function (err) {
118+
t.error(err)
119+
})
120+
109121
client.start()
110122

111123
client.once('update', function () {
@@ -137,6 +149,10 @@ test('http: client.scrape()', function (t) {
137149
t.error(err)
138150
})
139151

152+
client.on('warning', function (err) {
153+
t.error(err)
154+
})
155+
140156
client.once('scrape', function (data) {
141157
t.equal(data.announce, announceUrl)
142158
t.equal(typeof data.complete, 'number')

0 commit comments

Comments
 (0)