diff options
Diffstat (limited to 'server/tests/utils/miscs')
-rw-r--r-- | server/tests/utils/miscs/miscs.ts | 9 |
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 @@ | |||
1 | import { join } from 'path' | ||
1 | import * as WebTorrent from 'webtorrent' | 2 | import * as WebTorrent from 'webtorrent' |
2 | 3 | ||
3 | let webtorrent = new WebTorrent() | 4 | let 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 | ||
28 | function root () { | ||
29 | // We are in server/tests/utils/miscs | ||
30 | return join(__dirname, '..', '..', '..', '..') | ||
31 | } | ||
32 | |||
27 | // --------------------------------------------------------------------------- | 33 | // --------------------------------------------------------------------------- |
28 | 34 | ||
29 | export { | 35 | export { |
30 | dateIsValid, | 36 | dateIsValid, |
31 | wait, | 37 | wait, |
32 | webtorrentAdd, | 38 | webtorrentAdd, |
33 | immutableAssign | 39 | immutableAssign, |
40 | root | ||
34 | } | 41 | } |