Typeerror Cannot Read Property Type Of Undefined Jest