New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use memory chunk store for unit tests #871
Merged
+34
−25
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
| @@ -1,6 +1,7 @@ | ||
| var extend = require('xtend') | ||
| var fixtures = require('webtorrent-fixtures') | ||
| var fs = require('fs') | ||
| var MemoryChunkStore = require('memory-chunk-store') | ||
| var series = require('run-series') | ||
| var test = require('tape') | ||
| var TrackerServer = require('bittorrent-tracker/server') | ||
| @@ -15,7 +16,7 @@ test('Download using HTTP tracker (via magnet uri)', function (t) { | ||
| }) | ||
|
|
||
| function magnetDownloadTest (t, serverType) { | ||
| t.plan(10) | ||
| t.plan(11) | ||
feross
Member
|
||
|
|
||
| var tracker = new TrackerServer( | ||
| serverType === 'udp' ? { http: false, ws: false } : { udp: false, ws: false } | ||
| @@ -70,7 +71,7 @@ function magnetDownloadTest (t, serverType) { | ||
| }) | ||
| }) | ||
|
|
||
| client1.add(parsedTorrent) | ||
| client1.add(parsedTorrent, {store: MemoryChunkStore}) | ||
| }, | ||
|
|
||
| function (cb) { | ||
| @@ -102,7 +103,7 @@ function magnetDownloadTest (t, serverType) { | ||
| } | ||
| }) | ||
|
|
||
| client2.add(magnetURI) | ||
| client2.add(magnetURI, {store: MemoryChunkStore}) | ||
| } | ||
|
|
||
| ], function (err) { | ||
ProTip!
Use n and p to navigate between commits in a pull request.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
This test was not passing with an empty store, I assume this is the good number.