From 89297e748f851aee7653cd1ca911781a058ba01c Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sun, 6 Mar 2022 17:26:53 +0100 Subject: [PATCH] fix: TypeError in HistoryEntryImportDto For reasons, during testing, reflect-metadata might not be imported. This causes the `@Type` annotation to crash the test with a TypeError. Signed-off-by: David Mehren --- src/history/history-entry-import.dto.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/history/history-entry-import.dto.ts b/src/history/history-entry-import.dto.ts index e11ea6000..fda32323b 100644 --- a/src/history/history-entry-import.dto.ts +++ b/src/history/history-entry-import.dto.ts @@ -11,6 +11,8 @@ import { IsString, ValidateNested, } from 'class-validator'; +// This needs to be here because of weird import-behaviour during tests +import 'reflect-metadata'; import { BaseDto } from '../utils/base.dto.';