From 35fc44f9b98d6970244a517a5a9ca6175a3b40f5 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 12 Aug 2019 15:41:54 +0200 Subject: Rename util function for tests --- test/common.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/common.js') diff --git a/test/common.js b/test/common.js index 9ac99a1..8c30686 100644 --- a/test/common.js +++ b/test/common.js @@ -2,12 +2,12 @@ const os = require('os') const fs = require('fs') const path = require('path') -exports.getTestPath = function (infix, infoHash) { - let testPath +exports.getDownloadPath = function (infix, infoHash) { + let downloadPath try { - testPath = path.join(fs.statSync('/tmp') && '/tmp', 'webtorrent', 'test') + downloadPath = path.join(fs.statSync('/tmp') && '/tmp', 'webtorrent', 'test') } catch (err) { - testPath = path.join(typeof os.tmpdir === 'function' ? os.tmpdir() : '/', 'webtorrent', 'test') + downloadPath = path.join(typeof os.tmpdir === 'function' ? os.tmpdir() : '/', 'webtorrent', 'test') } - return path.join(testPath, infix, infoHash) + return path.join(downloadPath, infix, infoHash) } -- cgit v1.2.3