aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils/videos/videos.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/utils/videos/videos.ts')
-rw-r--r--server/tests/utils/videos/videos.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/tests/utils/videos/videos.ts b/server/tests/utils/videos/videos.ts
index d6bf27dc7..aca51ee5d 100644
--- a/server/tests/utils/videos/videos.ts
+++ b/server/tests/utils/videos/videos.ts
@@ -201,7 +201,7 @@ function searchVideoWithSort (url: string, search: string, sort: string) {
201 .expect('Content-Type', /json/) 201 .expect('Content-Type', /json/)
202} 202}
203 203
204async function testVideoImage (url: string, imageName: string, imagePath: string) { 204async function testVideoImage (url: string, imageName: string, imagePath: string, extension = '.jpg') {
205 // Don't test images if the node env is not set 205 // Don't test images if the node env is not set
206 // Because we need a special ffmpeg version for this test 206 // Because we need a special ffmpeg version for this test
207 if (process.env['NODE_TEST_IMAGE']) { 207 if (process.env['NODE_TEST_IMAGE']) {
@@ -209,7 +209,7 @@ async function testVideoImage (url: string, imageName: string, imagePath: string
209 .get(imagePath) 209 .get(imagePath)
210 .expect(200) 210 .expect(200)
211 211
212 const data = await readFilePromise(join(__dirname, '..', '..', 'api', 'fixtures', imageName + '.jpg')) 212 const data = await readFilePromise(join(__dirname, '..', '..', 'api', 'fixtures', imageName + extension))
213 213
214 return data.equals(res.body) 214 return data.equals(res.body)
215 } else { 215 } else {