-
Notifications
You must be signed in to change notification settings - Fork 712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Major bug, request scope in a singleton class is not working #1549
Comments
This might be my workaround
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
request-scoped dependency is not working in a singleton class.
Expected Behavior
Writing a test case to validate the behavior of a singleton class with a request-scoped dependency involves simulating different request contexts and verifying that the singleton class behaves according to the request-scoped dependency. Here's a basic example using a hypothetical Node.js environment with Inversify for dependency injection and a testing framework like Jest.
Current Behavior
Request scope dependency is not refreshing with new value.
Steps to Reproduce (for bugs)
Singleton Service: MySingletonService is a singleton and should be the same instance in both contexts.
Request-Scoped Dependency: MyRequestScopedDependency is request-scoped, so it should have different values in different contexts.
Your Environment
The text was updated successfully, but these errors were encountered: