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/basic.js
parenta0d212c8882fb5dbbeabc27b861e79980b6dd52e (diff)
Use path.resolve in tests
See https://github.com/feross/webtorrent/issues/429#issuecomment-139878312
Diffstat (limited to 'test/basic.js')
-rw-r--r--test/basic.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/basic.js b/test/basic.js
index 28988c0..4fedcb8 100644
--- a/test/basic.js
+++ b/test/basic.js
@@ -1,12 +1,13 @@
+var path = require('path')
var fs = require('fs')
var extend = require('xtend')
var parseTorrent = require('parse-torrent')
var test = require('tape')
var WebTorrent = require('../')
-var leaves = fs.readFileSync(__dirname + '/torrents/leaves.torrent')
+var leaves = fs.readFileSync(path.resolve(__dirname, 'torrents', 'leaves.torrent'))
var leavesTorrent = parseTorrent(leaves)
-var leavesBook = fs.readFileSync(__dirname + '/content/Leaves of Grass by Walt Whitman.epub')
+var leavesBook = fs.readFileSync(path.resolve(__dirname, 'content', 'Leaves of Grass by Walt Whitman.epub'))
var leavesMagnetURI = 'magnet:?xt=urn:btih:d2474e86c95b19b8bcfdb92bc12c9d44667cfa36&dn=Leaves+of+Grass+by+Walt+Whitman.epub&tr=http%3A%2F%2Ftracker.bittorrent.am%2Fannounce&tr=http%3A%2F%2Ftracker.thepiratebay.org%2Fannounce&tr=udp%3A%2F%2Ffr33domtracker.h33t.com%3A3310%2Fannounce&tr=udp%3A%2F%2Ftracker.ccc.de%3A80&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80'