diff options
author | Diego RodrÃguez Baquero <github@diegorbaquero.com> | 2021-07-11 04:27:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-11 04:27:48 +0300 |
commit | 46033ae52eca6e22301bb8ed9566c498d3494711 (patch) | |
tree | 93cf4583fc9471dbe8e0b050c55b643638768f40 /test/torrent-destroy.js | |
parent | feb719d5426df7ad45d00ffadecb931780763134 (diff) |
fix: modernize code (#2134)
* fix: modernize code
* standard fix
Diffstat (limited to 'test/torrent-destroy.js')
-rw-r--r-- | test/torrent-destroy.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/torrent-destroy.js b/test/torrent-destroy.js index 5795405..f220cf2 100644 --- a/test/torrent-destroy.js +++ b/test/torrent-destroy.js @@ -2,23 +2,23 @@ const fixtures = require('webtorrent-fixtures') const test = require('tape') const WebTorrent = require('../') -test('torrent.destroy: destroy and remove torrent', function (t) { +test('torrent.destroy: destroy and remove torrent', t => { t.plan(5) const client = new WebTorrent({ dht: false, tracker: false, lsd: false }) - client.on('error', function (err) { t.fail(err) }) - client.on('warning', function (err) { t.fail(err) }) + client.on('error', err => { t.fail(err) }) + client.on('warning', err => { t.fail(err) }) const torrent = client.add(fixtures.leaves.parsedTorrent.infoHash) t.equal(client.torrents.length, 1) - torrent.on('infoHash', function () { + torrent.on('infoHash', () => { t.equal(torrent.infoHash, fixtures.leaves.parsedTorrent.infoHash) - torrent.destroy(function (err) { t.error(err, 'torrent destroyed') }) + torrent.destroy(err => { t.error(err, 'torrent destroyed') }) t.equal(client.torrents.length, 0) - client.destroy(function (err) { t.error(err, 'client destroyed') }) + client.destroy(err => { t.error(err, 'client destroyed') }) }) }) |