Open
Description
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
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.
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