Skip to content

Commit 8f1ceac

Browse files
Move test case into the existing test
1 parent 5449f0f commit 8f1ceac

File tree

1 file changed

+13
-22
lines changed

1 file changed

+13
-22
lines changed

spec/ParseFile.spec.js

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,7 +1368,7 @@ describe('Parse.File testing', () => {
13681368
await reconfigureServer({
13691369
fileUpload: {
13701370
enableForPublic: true,
1371-
fileExtensions: ['jpg'],
1371+
fileExtensions: ['jpg', 'any'],
13721372
},
13731373
});
13741374
await expectAsync(
@@ -1387,6 +1387,18 @@ describe('Parse.File testing', () => {
13871387
).toBeRejectedWith(
13881388
new Parse.Error(Parse.Error.FILE_SAVE_ERROR, `File upload of extension html is disabled.`)
13891389
);
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();
13901402
});
13911403

13921404
it('works with array without Content-Type', async () => {
@@ -1436,25 +1448,4 @@ describe('Parse.File testing', () => {
14361448
expect(b.url).toMatch(/^http:\/\/localhost:8378\/1\/files\/test\/.*file.html$/);
14371449
});
14381450
});
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-
});
14601451
});

0 commit comments

Comments
 (0)