aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils/miscs/miscs.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/utils/miscs/miscs.ts')
-rw-r--r--server/tests/utils/miscs/miscs.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/server/tests/utils/miscs/miscs.ts b/server/tests/utils/miscs/miscs.ts
index 2aac37791..e6666619b 100644
--- a/server/tests/utils/miscs/miscs.ts
+++ b/server/tests/utils/miscs/miscs.ts
@@ -1,3 +1,4 @@
1import { join } from 'path'
1import * as WebTorrent from 'webtorrent' 2import * as WebTorrent from 'webtorrent'
2 3
3let webtorrent = new WebTorrent() 4let webtorrent = new WebTorrent()
@@ -24,11 +25,17 @@ function webtorrentAdd (torrent: string, refreshWebTorrent = false) {
24 return new Promise<WebTorrent.Torrent>(res => webtorrent.add(torrent, res)) 25 return new Promise<WebTorrent.Torrent>(res => webtorrent.add(torrent, res))
25} 26}
26 27
28function root () {
29 // We are in server/tests/utils/miscs
30 return join(__dirname, '..', '..', '..', '..')
31}
32
27// --------------------------------------------------------------------------- 33// ---------------------------------------------------------------------------
28 34
29export { 35export {
30 dateIsValid, 36 dateIsValid,
31 wait, 37 wait,
32 webtorrentAdd, 38 webtorrentAdd,
33 immutableAssign 39 immutableAssign,
40 root
34} 41}