fix(backend): Fix type errors in query builder mock

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-03-10 09:27:27 +01:00 committed by David Mehren
parent e23f0ff259
commit 088f2905a5

View file

@ -12,7 +12,7 @@ import { ObjectLiteral, Repository, SelectQueryBuilder } from 'typeorm';
* @param returnValue The entity to return * @param returnValue The entity to return
* @return The mocked query builder * @return The mocked query builder
*/ */
export function mockSelectQueryBuilder<T>( export function mockSelectQueryBuilder<T extends ObjectLiteral>(
returnValue: T | null, returnValue: T | null,
): SelectQueryBuilder<T> { ): SelectQueryBuilder<T> {
const mockedQueryBuilder: SelectQueryBuilder<T> = Mock.of< const mockedQueryBuilder: SelectQueryBuilder<T> = Mock.of<