standard 6 prep

This commit is contained in:
Feross Aboukhadijeh 2016-02-05 14:08:46 -08:00
parent ab042bd2f6
commit 87d3189420
4 changed files with 9 additions and 5 deletions

View File

@ -1,10 +1,11 @@
var Client = require('../')
var fs = require('fs')
var parseTorrent = require('parse-torrent')
var path = require('path')
var Server = require('../').Server
var test = require('tape')
var torrent = fs.readFileSync(__dirname + '/torrents/sintel-5gb.torrent')
var torrent = fs.readFileSync(path.join(__dirname, 'torrents/sintel-5gb.torrent'))
var parsedTorrent = parseTorrent(torrent)
var peerId = new Buffer('01234567890123456789')

View File

@ -2,9 +2,10 @@ var Client = require('../')
var common = require('./common')
var fs = require('fs')
var parseTorrent = require('parse-torrent')
var path = require('path')
var test = require('tape')
var torrent = fs.readFileSync(__dirname + '/torrents/bitlove-intro.torrent')
var torrent = fs.readFileSync(path.join(__dirname, 'torrents/bitlove-intro.torrent'))
var parsedTorrent = parseTorrent(torrent)
var peerId1 = new Buffer('01234567890123456789')
var peerId2 = new Buffer('12345678901234567890')

View File

@ -1,13 +1,14 @@
var Client = require('../')
var fs = require('fs')
var parseTorrent = require('parse-torrent')
var path = require('path')
var Server = require('../').Server
var test = require('tape')
var bitlove = fs.readFileSync(__dirname + '/torrents/bitlove-intro.torrent')
var bitlove = fs.readFileSync(path.join(__dirname, 'torrents/bitlove-intro.torrent'))
var parsedBitlove = parseTorrent(bitlove)
var leaves = fs.readFileSync(__dirname + '/torrents/leaves.torrent')
var leaves = fs.readFileSync(path.join(__dirname, 'torrents/leaves.torrent'))
var parsedLeaves = parseTorrent(leaves)
var peerId = new Buffer('01234567890123456789')

View File

@ -5,6 +5,7 @@ var commonTest = require('./common')
var fs = require('fs')
var get = require('simple-get')
var parseTorrent = require('parse-torrent')
var path = require('path')
var Server = require('../').Server
var test = require('tape')
@ -13,7 +14,7 @@ var binaryInfoHash1 = commonLib.hexToBinary(infoHash1)
var infoHash2 = 'bbb67059ed6bd08362da625b3ae77f6f4a075bbb'
var binaryInfoHash2 = commonLib.hexToBinary(infoHash2)
var bitlove = fs.readFileSync(__dirname + '/torrents/bitlove-intro.torrent')
var bitlove = fs.readFileSync(path.join(__dirname, 'torrents/bitlove-intro.torrent'))
var parsedBitlove = parseTorrent(bitlove)
var binaryBitlove = commonLib.hexToBinary(parsedBitlove.infoHash)