From 6edfaa06849d57becf7f49522d04c3fd070eabf7 Mon Sep 17 00:00:00 2001 From: Ellen Kraffmiller Date: Tue, 29 Oct 2024 17:53:58 -0400 Subject: [PATCH] fix Mock CollectionRepository classes --- src/stories/collection/CollectionErrorMockRepository.ts | 2 +- src/stories/collection/NoCollectionMockRepository.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stories/collection/CollectionErrorMockRepository.ts b/src/stories/collection/CollectionErrorMockRepository.ts index 2d5e8b4e7..b897f3853 100644 --- a/src/stories/collection/CollectionErrorMockRepository.ts +++ b/src/stories/collection/CollectionErrorMockRepository.ts @@ -7,7 +7,7 @@ import { CollectionFacet } from '../../collection/domain/models/CollectionFacet' import { CollectionMockRepository } from './CollectionMockRepository' export class CollectionErrorMockRepository extends CollectionMockRepository { - getById(_id: string): Promise { + getById(_id?: string): Promise { return new Promise((_resolve, reject) => { setTimeout(() => { reject('Something went wrong') diff --git a/src/stories/collection/NoCollectionMockRepository.ts b/src/stories/collection/NoCollectionMockRepository.ts index 17cb063a0..63d8c5e00 100644 --- a/src/stories/collection/NoCollectionMockRepository.ts +++ b/src/stories/collection/NoCollectionMockRepository.ts @@ -7,7 +7,7 @@ import { CollectionFacet } from '../../collection/domain/models/CollectionFacet' import { CollectionMockRepository } from './CollectionMockRepository' export class NoCollectionMockRepository extends CollectionMockRepository { - getById(_id: string): Promise { + getById(_id?: string): Promise { return new Promise((_resolve, reject) => { setTimeout(() => { reject('Collection not found')