standard 6 prep
This commit is contained in:
parent
a04ea1dab5
commit
9bf62ed135
|
@ -1,11 +1,12 @@
|
||||||
var fs = require('fs')
|
|
||||||
var Protocol = require('bittorrent-protocol')
|
|
||||||
var ut_metadata = require('../')
|
|
||||||
var bencode = require('bencode')
|
var bencode = require('bencode')
|
||||||
|
var fs = require('fs')
|
||||||
|
var path = require('path')
|
||||||
|
var Protocol = require('bittorrent-protocol')
|
||||||
var test = require('tape')
|
var test = require('tape')
|
||||||
|
var ut_metadata = require('../')
|
||||||
|
|
||||||
// Used in multiple tests
|
// Used in multiple tests
|
||||||
var metadata = fs.readFileSync(__dirname + '/torrents/leaves-magnet.torrent')
|
var metadata = fs.readFileSync(path.join(__dirname, 'torrents/leaves-magnet.torrent'))
|
||||||
|
|
||||||
test('wire.use(ut_metadata())', function (t) {
|
test('wire.use(ut_metadata())', function (t) {
|
||||||
var wire = new Protocol()
|
var wire = new Protocol()
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
|
var bencode = require('bencode')
|
||||||
var fs = require('fs')
|
var fs = require('fs')
|
||||||
var parseTorrent = require('parse-torrent')
|
var parseTorrent = require('parse-torrent')
|
||||||
|
var path = require('path')
|
||||||
var Protocol = require('bittorrent-protocol')
|
var Protocol = require('bittorrent-protocol')
|
||||||
var ut_metadata = require('../')
|
|
||||||
var bencode = require('bencode')
|
|
||||||
var test = require('tape')
|
var test = require('tape')
|
||||||
|
var ut_metadata = require('../')
|
||||||
|
|
||||||
// Used in multiple tests
|
// Used in multiple tests
|
||||||
var metadata = fs.readFileSync(__dirname + '/torrents/leaves-magnet.torrent')
|
var metadata = fs.readFileSync(path.join(__dirname, 'torrents/leaves-magnet.torrent'))
|
||||||
var parsedTorrent = parseTorrent(metadata)
|
var parsedTorrent = parseTorrent(metadata)
|
||||||
|
|
||||||
var largeMetadata = fs.readFileSync(__dirname + '/torrents/ubuntu-12.04.4-alternate-amd64.iso.torrent')
|
var largeMetadata = fs.readFileSync(path.join(__dirname, 'torrents/ubuntu-12.04.4-alternate-amd64.iso.torrent'))
|
||||||
var largeParsedTorrent = parseTorrent(largeMetadata)
|
var largeParsedTorrent = parseTorrent(largeMetadata)
|
||||||
|
|
||||||
var id1 = new Buffer('01234567890123456789')
|
var id1 = new Buffer('01234567890123456789')
|
||||||
|
|
Loading…
Reference in New Issue