mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 16:29:34 +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 fse = require('fs-extra');
|
||||
const _ = require('lodash');
|
||||
const { ForbiddenError } = require('@strapi/utils').errors;
|
||||
const { ApplicationError } = require('@strapi/utils').errors;
|
||||
const uploadService = require('../../upload')({});
|
||||
|
||||
const imageFilePath = path.join(__dirname, './image.png');
|
||||
@ -98,6 +98,6 @@ describe('Upload image', () => {
|
||||
|
||||
expect(async () => {
|
||||
await uploadService.uploadImage(fileData);
|
||||
}).rejects.toThrow(ForbiddenError);
|
||||
}).rejects.toThrow(ApplicationError);
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user