Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Frazier <joseph@onsip.com>2015-10-04 23:29:28 +0300
committerJoseph Frazier <joseph@onsip.com>2015-10-04 23:31:37 +0300
commitb3055504fffc1990f2d0745655da690ae23ff05b (patch)
treed23088eba2ff25d03528e6785a16b9629451d06c /test/download-tracker-torrent.js
parenta0d212c8882fb5dbbeabc27b861e79980b6dd52e (diff)
Use path.resolve in tests
See https://github.com/feross/webtorrent/issues/429#issuecomment-139878312
Diffstat (limited to 'test/download-tracker-torrent.js')
-rw-r--r--test/download-tracker-torrent.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/download-tracker-torrent.js b/test/download-tracker-torrent.js
index 909fcaa..438450a 100644
--- a/test/download-tracker-torrent.js
+++ b/test/download-tracker-torrent.js
@@ -1,13 +1,14 @@
var auto = require('run-auto')
+var path = require('path')
var fs = require('fs')
var parseTorrent = require('parse-torrent')
var test = require('tape')
var TrackerServer = require('bittorrent-tracker/server')
var WebTorrent = require('../')
-var leavesPath = __dirname + '/content/Leaves of Grass by Walt Whitman.epub'
+var leavesPath = path.resolve(__dirname, 'content', 'Leaves of Grass by Walt Whitman.epub')
var leavesFile = fs.readFileSync(leavesPath)
-var leavesTorrent = fs.readFileSync(__dirname + '/torrents/leaves.torrent')
+var leavesTorrent = fs.readFileSync(path.resolve(__dirname, 'torrents', 'leaves.torrent'))
var leavesParsed = parseTorrent(leavesTorrent)
test('Download using UDP tracker (via .torrent file)', function (t) {