diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2015-01-27 12:10:23 +0300 |
---|---|---|
committer | Feross Aboukhadijeh <feross@feross.org> | 2015-01-27 12:10:23 +0300 |
commit | f5302a98131ca1e56591a49ff6ece472917b3ed8 (patch) | |
tree | d1ff6aa8c508fb3d000f602f407188b8910ffcfc /test | |
parent | b2541ab952956c4b01cd94f003ffcad0af355d4d (diff) |
style
Diffstat (limited to 'test')
-rw-r--r-- | test/cmd.js | 2 | ||||
-rw-r--r-- | test/metadata.js | 3 | ||||
-rw-r--r-- | test/storage.js | 4 |
3 files changed, 5 insertions, 4 deletions
diff --git a/test/cmd.js b/test/cmd.js index 36e2c0b..498eec3 100644 --- a/test/cmd.js +++ b/test/cmd.js @@ -59,7 +59,7 @@ test('Command line: webtorrent info /path/to/file.torrent', function (t) { t.deepEqual(data, JSON.parse(JSON.stringify(parsedTorrent, undefined, 2))) }) - cp.exec(CMD + ' info /bad/path', function (err, data) { + cp.exec(CMD + ' info /bad/path', function (err) { t.ok(err instanceof Error) }) }) diff --git a/test/metadata.js b/test/metadata.js index b9ab33f..e812c3f 100644 --- a/test/metadata.js +++ b/test/metadata.js @@ -7,13 +7,14 @@ var leaves = fs.readFileSync(__dirname + '/torrents/leaves.torrent') var leavesTorrent = parseTorrent(leaves) test('ut_metadata transfer', function (t) { - t.plan(5) + t.plan(6) var client1 = new WebTorrent({ dht: false, tracker: false }) var client2 = new WebTorrent({ dht: false, tracker: false }) client1.on('torrent', function (torrent) { t.pass('client1 emits torrent event') // even though it started with metadata + t.ok(torrent.metadata, 'metadata exists') }) // client1 starts with metadata from torrent file diff --git a/test/storage.js b/test/storage.js index 6665be6..15c3987 100644 --- a/test/storage.js +++ b/test/storage.js @@ -24,7 +24,7 @@ torrents.forEach(function (torrent) { var length = 0 var pieces = 0 - storage.pieces.forEach(function (piece, index) { + storage.pieces.forEach(function (piece) { t.notOk(piece.verified) length += piece.length @@ -37,7 +37,7 @@ torrents.forEach(function (torrent) { t.equal(length, parsedTorrent.length) length = 0 - storage.files.forEach(function (file, index) { + storage.files.forEach(function (file) { t.notOk(file.done) length += file.length pieces += file.pieces.length |