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:
Diffstat (limited to 'test/node/metadata.js')
-rw-r--r--test/node/metadata.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/node/metadata.js b/test/node/metadata.js
index 6a40f25..2b3fe56 100644
--- a/test/node/metadata.js
+++ b/test/node/metadata.js
@@ -26,9 +26,9 @@ test('ut_metadata transfer', function (t) {
t.deepEqual(torrent1.info, fixtures.leaves.parsedTorrent.info)
// client2 starts with infohash
- client2.add(fixtures.leaves.parsedTorrent.infoHash)
+ var torrent2 = client2.add(fixtures.leaves.parsedTorrent.infoHash)
- client2.on('listening', function (port, torrent2) {
+ torrent2.on('infoHash', function () {
// manually add the peer
torrent2.addPeer('127.0.0.1:' + client1.address().port)