diff options
Diffstat (limited to 'test/node/download-webseed-magnet.js')
-rw-r--r-- | test/node/download-webseed-magnet.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/node/download-webseed-magnet.js b/test/node/download-webseed-magnet.js index e0d39bf..2f172a0 100644 --- a/test/node/download-webseed-magnet.js +++ b/test/node/download-webseed-magnet.js @@ -2,6 +2,7 @@ var finalhandler = require('finalhandler') var fixtures = require('webtorrent-fixtures') var http = require('http') var path = require('path') +var MemoryChunkStore = require('memory-chunk-store') var series = require('run-series') var serveStatic = require('serve-static') var test = require('tape') @@ -10,7 +11,7 @@ var WebTorrent = require('../../') test('Download using webseed (via magnet uri)', function (t) { t.plan(9) - var serve = serveStatic(path.join(__dirname, 'content')) + var serve = serveStatic(path.dirname(fixtures.leaves.contentPath)) var httpServer = http.createServer(function (req, res) { var done = finalhandler(req, res) serve(req, res, done) @@ -51,7 +52,7 @@ test('Download using webseed (via magnet uri)', function (t) { maybeDone() }) - var torrent = client1.add(fixtures.leaves.parsedTorrent) + var torrent = client1.add(fixtures.leaves.parsedTorrent, {store: MemoryChunkStore}) torrent.on('infoHash', function () { gotListening = true @@ -91,7 +92,7 @@ test('Download using webseed (via magnet uri)', function (t) { } }) - var torrent = client2.add(magnetURI) + var torrent = client2.add(magnetURI, {store: MemoryChunkStore}) torrent.on('infoHash', function () { torrent.addPeer('127.0.0.1:' + client1.address().port) |