MCPcopy Index your code
hub / github.com/parse-community/parse-server / expectMissingFile

Function expectMissingFile

spec/GridFSBucketStorageAdapter.spec.js:7–14  ·  view source on GitHub ↗
(gfsAdapter, name)

Source from the content-addressed store, hash-verified

5const request = require('../lib/request');
6
7async function expectMissingFile(gfsAdapter, name) {
8 try {
9 await gfsAdapter.getFileData(name);
10 fail('should have thrown');
11 } catch (e) {
12 expect(e.message).toEqual('FileNotFound: file myFileName was not found');
13 }
14}
15
16describe_only_db('mongo')('GridFSBucket', () => {
17 beforeEach(async () => {

Calls 2

failFunction · 0.85
getFileDataMethod · 0.45

Tested by

no test coverage detected