Skip to content

Commit 3647128

Browse files
committed
test: fix
1 parent 8e4e655 commit 3647128

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spec/GridFSBucketStorageAdapter.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -424,9 +424,9 @@ describe_only_db('mongo')('GridFSBucket', () => {
424424
it('properly upload a file when disableIndexFieldValidation exist in databaseOptions', async () => {
425425
const gfsAdapter = new GridFSBucketAdapter(databaseURI, { disableIndexFieldValidation: true });
426426
const twoMegabytesFile = randomString(2048 * 1024);
427-
const res = await gfsAdapter.createFile('myFileName', twoMegabytesFile);
428-
expect(res._id).toBeTruthy();
429-
expect(res.filename).toEqual('myFileName');
427+
await gfsAdapter.createFile('myFileName', twoMegabytesFile);
428+
const gfsResult = await gfsAdapter.getFileData('myFileName');
429+
expect(gfsResult.toString('utf8')).toBe(twoMegabytesFile);
430430
});
431431

432432
it('properly deletes a file from GridFS', async () => {

0 commit comments

Comments
 (0)