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:
Diffstat (limited to 'test/common.js')
-rw-r--r--test/common.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/common.js b/test/common.js
index f11fcb2..4c3bf28 100644
--- a/test/common.js
+++ b/test/common.js
@@ -1,8 +1,8 @@
-const os = require('os')
-const fs = require('fs')
-const path = require('path')
+import os from 'os'
+import fs from 'fs'
+import path from 'path'
-exports.getDownloadPath = (infix, infoHash) => {
+const getDownloadPath = (infix, infoHash) => {
let tmpPath
try {
tmpPath = path.join(fs.statSync('/tmp') && '/tmp')
@@ -11,3 +11,5 @@ exports.getDownloadPath = (infix, infoHash) => {
}
return path.join(tmpPath, 'webtorrent', 'test', infix, infoHash)
}
+
+export default { getDownloadPath }