]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/check-params/video-captions.ts
Merge branch 'master' into develop
[github/Chocobozzz/PeerTube.git] / server / tests / api / check-params / video-captions.ts
index 4a373d43de15ff244d1132002e9e230d67b1c1a2..a5f5c332284469b256e359fa4e4751e04f343956 100644 (file)
@@ -1,4 +1,4 @@
-/* tslint:disable:no-unused-expression */
+/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
 
 import 'mocha'
 import {
@@ -50,7 +50,7 @@ describe('Test video captions API validator', function () {
   describe('When adding video caption', function () {
     const fields = { }
     const attaches = {
-      'captionfile': join(__dirname, '..', '..', 'fixtures', 'subtitle-good1.vtt')
+      captionfile: join(__dirname, '..', '..', 'fixtures', 'subtitle-good1.vtt')
     }
 
     it('Should fail without a valid uuid', async function () {
@@ -124,22 +124,23 @@ describe('Test video captions API validator', function () {
       })
     })
 
-    it('Should fail with an invalid captionfile extension', async function () {
-      const attaches = {
-        'captionfile': join(__dirname, '..', '..', 'fixtures', 'subtitle-bad.txt')
-      }
-
-      const captionPath = path + videoUUID + '/captions/fr'
-      await makeUploadRequest({
-        method: 'PUT',
-        url: server.url,
-        path: captionPath,
-        token: server.accessToken,
-        fields,
-        attaches,
-        statusCodeExpected: 400
-      })
-    })
+    // We accept any file now
+    // it('Should fail with an invalid captionfile extension', async function () {
+    //   const attaches = {
+    //     'captionfile': join(__dirname, '..', '..', 'fixtures', 'subtitle-bad.txt')
+    //   }
+    //
+    //   const captionPath = path + videoUUID + '/captions/fr'
+    //   await makeUploadRequest({
+    //     method: 'PUT',
+    //     url: server.url,
+    //     path: captionPath,
+    //     token: server.accessToken,
+    //     fields,
+    //     attaches,
+    //     statusCodeExpected: 400
+    //   })
+    // })
 
     // We don't check the extension yet
     // it('Should fail with an invalid captionfile extension and octet-stream mime type', async function () {