I'm using typegraphql, and i register DayOfWeek enum type using resgiterEnumType.
following is my enum and registerEnumType function, and they are in one file.
export enum DayOfWeek {
SUNDAY,
MONDAY,
TUESDAY,
WEDNESDAY,
THURSDAY,
FRIDAY,
SATURDAY
}
registerEnumType(DayOfWeek, {
name: "DayOfWeekType", // this one is mandatory
});
It works well when i run program. but when i run jest test I got an message like following
Looks like you've forgot to provide experimental metadata API polyfill.
12 | }
13 |
> 14 | registerEnumType(DayOfWeek, {
| ^
15 | name: "DayOfWeekType", // this one is mandatory
16 | });
17 |
If i put enum and registerEnumType in the same file, run works well and test is failed.
and If i separate enum and registerEnumType, graphql not found DayOfWeek type....
how can i solved that?