mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 17:00:55 +00:00
expect Application Error in test
This commit is contained in:
parent
5b0bcab7b1
commit
096dba7983
@ -4,7 +4,7 @@ const path = require('path');
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const fse = require('fs-extra');
|
const fse = require('fs-extra');
|
||||||
const _ = require('lodash');
|
const _ = require('lodash');
|
||||||
const { ForbiddenError } = require('@strapi/utils').errors;
|
const { ApplicationError } = require('@strapi/utils').errors;
|
||||||
const uploadService = require('../../upload')({});
|
const uploadService = require('../../upload')({});
|
||||||
|
|
||||||
const imageFilePath = path.join(__dirname, './image.png');
|
const imageFilePath = path.join(__dirname, './image.png');
|
||||||
@ -98,6 +98,6 @@ describe('Upload image', () => {
|
|||||||
|
|
||||||
expect(async () => {
|
expect(async () => {
|
||||||
await uploadService.uploadImage(fileData);
|
await uploadService.uploadImage(fileData);
|
||||||
}).rejects.toThrow(ForbiddenError);
|
}).rejects.toThrow(ApplicationError);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user