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
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.
Steps to reproduce
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
orit
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.
Expected Behavior
The function should be defined.
Link to reproduction sandbox
I dont know what this means.
Additional information
darwin x64 14.19.1
"loopback": "^3.9.0"
"loopback-boot": "^2.6.5"
"loopback-connector-mysql": "^6.1.0"
"loopback-context": "^3.3.0"
Related Issues
None
The text was updated successfully, but these errors were encountered: