@@ -219,7 +219,9 @@ describe('Deluge', () => {
219
219
const client = new Deluge ( { baseUrl } ) ;
220
220
const list = await setupTorrent ( client ) ;
221
221
const key = Object . keys ( list . result . torrents ) [ 0 ] ;
222
+ await client . addLabel ( 'swag' ) ;
222
223
const res = await client . setTorrentLabel ( key , 'swag' ) ;
224
+ await client . removeLabel ( 'swag' ) ;
223
225
expect ( res . result ) . toBe ( null ) ;
224
226
} ) ;
225
227
it ( 'should pause/resume torrents' , async ( ) => {
@@ -285,9 +287,9 @@ describe('Deluge', () => {
285
287
label : 'test' ,
286
288
} ) ;
287
289
expect ( torrent . connectedPeers ) . toBeGreaterThanOrEqual ( 0 ) ;
288
- expect ( torrent . connectedSeeds ) . toBe ( 0 ) ;
289
- expect ( torrent . downloadSpeed ) . toBe ( 0 ) ;
290
- expect ( torrent . eta ) . toBe ( 0 ) ;
290
+ expect ( torrent . connectedSeeds ) . toBeGreaterThanOrEqual ( 0 ) ;
291
+ expect ( torrent . downloadSpeed ) . toBeGreaterThanOrEqual ( 0 ) ;
292
+ expect ( torrent . eta ) . toBeGreaterThanOrEqual ( 0 ) ;
291
293
// expect(torrent.isCompleted).toBe(false);
292
294
// its setting the label but it takes an unknown number of seconds to save to db
293
295
// expect(torrent.label).toBe('');
@@ -298,12 +300,12 @@ describe('Deluge', () => {
298
300
// expect(torrent.savePath).toBe('/downloads/');
299
301
// expect(torrent.state).toBe(TorrentState.checking);
300
302
// expect(torrent.stateMessage).toBe('');
301
- expect ( torrent . totalDownloaded ) . toBe ( 0 ) ;
303
+ expect ( torrent . totalDownloaded ) . toBeGreaterThanOrEqual ( 0 ) ;
302
304
expect ( torrent . totalPeers ) . toBe ( - 1 ) ;
303
305
expect ( torrent . totalSeeds ) . toBe ( - 1 ) ;
304
306
expect ( torrent . totalSelected ) . toBe ( 1953349632 ) ;
305
307
// expect(torrent.totalSize).toBe(undefined);
306
- expect ( torrent . totalUploaded ) . toBe ( 0 ) ;
307
- expect ( torrent . uploadSpeed ) . toBe ( 0 ) ;
308
+ expect ( torrent . totalUploaded ) . toBeGreaterThanOrEqual ( 0 ) ;
309
+ expect ( torrent . uploadSpeed ) . toBeGreaterThanOrEqual ( 0 ) ;
308
310
} , 15000 ) ;
309
311
} ) ;
0 commit comments