projects
/
oweals
/
peertube.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support additional video extensions
[oweals/peertube.git]
/
shared
/
utils
/
miscs
/
miscs.ts
diff --git
a/shared/utils/miscs/miscs.ts
b/shared/utils/miscs/miscs.ts
index 589daa420d54c561867d6ddda827ee14828f3829..91a93b631f77673dd846f0082e86eabfc0f5441d 100644
(file)
--- a/
shared/utils/miscs/miscs.ts
+++ b/
shared/utils/miscs/miscs.ts
@@
-33,8
+33,8
@@
function webtorrentAdd (torrent: string, refreshWebTorrent = false) {
}
function root () {
}
function root () {
- // We are in
server/tests
/utils/miscs
- return join(__dirname, '..', '..', '..'
, '..'
)
+ // We are in
/shared
/utils/miscs
+ return join(__dirname, '..', '..', '..')
}
async function testImage (url: string, imageName: string, imagePath: string, extension = '.jpg') {
}
async function testImage (url: string, imageName: string, imagePath: string, extension = '.jpg') {
@@
-44,7
+44,7
@@
async function testImage (url: string, imageName: string, imagePath: string, ext
const body = res.body
const body = res.body
- const data = await readFile(join(
__dirname, '..', '..
', 'fixtures', imageName + extension))
+ const data = await readFile(join(
root(), 'server', 'tests
', 'fixtures', imageName + extension))
const minLength = body.length - ((20 * body.length) / 100)
const maxLength = body.length + ((20 * body.length) / 100)
const minLength = body.length - ((20 * body.length) / 100)
const maxLength = body.length + ((20 * body.length) / 100)
@@
-59,7
+59,7
@@
function buildAbsoluteFixturePath (path: string, customTravisPath = false) {
if (customTravisPath && process.env.TRAVIS) return join(process.env.HOME, 'fixtures', path)
if (customTravisPath && process.env.TRAVIS) return join(process.env.HOME, 'fixtures', path)
- return join(
__dirname, '..', '..
', 'fixtures', path)
+ return join(
root(), 'server', 'tests
', 'fixtures', path)
}
async function generateHighBitrateVideo () {
}
async function generateHighBitrateVideo () {