fix errors

This commit is contained in:
Fernando Chavez 2024-03-14 16:39:15 +01:00
parent 3523c1f7cf
commit ac00451e43
2 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
import { errors } from '@strapi/utils'; import { AlreadyOnReleaseError } from '../../services/validation';
import releaseActionController from '../release-action'; import releaseActionController from '../release-action';
const mockSanitizedQueryRead = jest.fn().mockResolvedValue({}); const mockSanitizedQueryRead = jest.fn().mockResolvedValue({});
@ -143,7 +143,7 @@ describe('Release Action controller', () => {
it('should count already added entries and dont throw an error', async () => { it('should count already added entries and dont throw an error', async () => {
mockCreateAction.mockRejectedValue( mockCreateAction.mockRejectedValue(
new errors.ValidationError( new AlreadyOnReleaseError(
'Entry with id 1 and contentType api::contentTypeA.contentTypeA already exists in release with id 1' 'Entry with id 1 and contentType api::contentTypeA.contentTypeA already exists in release with id 1'
) )
); );

View File

@ -1,6 +1,6 @@
import type Koa from 'koa'; import type Koa from 'koa';
import { mapAsync, errors } from '@strapi/utils'; import { mapAsync } from '@strapi/utils';
import { import {
validateReleaseAction, validateReleaseAction,
validateReleaseActionUpdateSchema, validateReleaseActionUpdateSchema,