@@ -1368,7 +1368,7 @@ describe('Parse.File testing', () => {
1368
1368
await reconfigureServer ( {
1369
1369
fileUpload : {
1370
1370
enableForPublic : true ,
1371
- fileExtensions : [ 'jpg' ] ,
1371
+ fileExtensions : [ 'jpg' , 'any' ] ,
1372
1372
} ,
1373
1373
} ) ;
1374
1374
await expectAsync (
@@ -1387,6 +1387,18 @@ describe('Parse.File testing', () => {
1387
1387
) . toBeRejectedWith (
1388
1388
new Parse . Error ( Parse . Error . FILE_SAVE_ERROR , `File upload of extension html is disabled.` )
1389
1389
) ;
1390
+ await expectAsync (
1391
+ request ( {
1392
+ method : 'POST' ,
1393
+ url : 'http://localhost:8378/1/files/file' ,
1394
+ body : JSON . stringify ( {
1395
+ _ApplicationId : 'test' ,
1396
+ _JavaScriptKey : 'test' ,
1397
+ _ContentType : 'image/jpg' ,
1398
+ base64 : 'PGh0bWw+PC9odG1sPgo=' ,
1399
+ } ) ,
1400
+ } )
1401
+ ) . toBeResolved ( ) ;
1390
1402
} ) ;
1391
1403
1392
1404
it ( 'works with array without Content-Type' , async ( ) => {
@@ -1436,25 +1448,4 @@ describe('Parse.File testing', () => {
1436
1448
expect ( b . url ) . toMatch ( / ^ h t t p : \/ \/ l o c a l h o s t : 8 3 7 8 \/ 1 \/ f i l e s \/ t e s t \/ .* f i l e .h t m l $ / ) ;
1437
1449
} ) ;
1438
1450
} ) ;
1439
-
1440
- it ( 'works with array with more elements' , async ( ) => {
1441
- await reconfigureServer ( {
1442
- fileUpload : {
1443
- enableForPublic : true ,
1444
- fileExtensions : [ 'jpeg' , 'png' ] ,
1445
- } ,
1446
- } ) ;
1447
- await expectAsync (
1448
- request ( {
1449
- method : 'POST' ,
1450
- url : 'http://localhost:8378/1/files/file' ,
1451
- body : JSON . stringify ( {
1452
- _ApplicationId : 'test' ,
1453
- _JavaScriptKey : 'test' ,
1454
- _ContentType : 'image/jpeg' ,
1455
- base64 : 'PGh0bWw+PC9odG1sPgo=' ,
1456
- } ) ,
1457
- } )
1458
- ) . toBeResolved ( ) ;
1459
- } ) ;
1460
1451
} ) ;
0 commit comments