File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -301,16 +301,18 @@ test('ws: client.announce() with params', function (t) {
301301} )
302302
303303function testClientGetAnnounceOpts ( t , serverType ) {
304- t . plan ( 5 )
304+ t . plan ( 7 )
305305
306306 common . createServer ( t , serverType , function ( server , announceUrl ) {
307307 var client = new Client ( {
308308 infoHash : fixtures . leaves . parsedTorrent . infoHash ,
309309 announce : announceUrl ,
310310 peerId : peerId1 ,
311311 port : port ,
312- getAnnounceOpts : function ( ) {
312+ getAnnounceOpts : function ( opts ) {
313313 return {
314+ infoHash : this . infoHash ,
315+ optsDL : opts . downloaded ,
314316 testParam : 'this is a test'
315317 }
316318 } ,
@@ -319,6 +321,8 @@ function testClientGetAnnounceOpts (t, serverType) {
319321
320322 server . on ( 'start' , function ( peer , params ) {
321323 t . equal ( params . testParam , 'this is a test' )
324+ t . equal ( params . infoHash , fixtures . leaves . parsedTorrent . infoHash )
325+ t . equal ( params . optsDL , params . downloaded )
322326 } )
323327
324328 if ( serverType === 'ws' ) common . mockWebsocketTracker ( client )
You can’t perform that action at this time.
0 commit comments