You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TypeError: TokenModel.findForRequest is not a function #4356
Setup the tests with Jest.
Enabled token middleware authentication.
Trying to call protected endpoint via supertest.
Current Behavior
When calling the endpoint from inside any test block like beforeAll or it I am getting the error "TypeError: TokenModel.findForRequest is not a function". And upon logging I see that the function is not even present.
Calling it from setup files like globalSetup or globalTeardown I do not get any such errors.
Activity