-
-
Notifications
You must be signed in to change notification settings - Fork 721
Closed
Description
Current behavior
The container.getAll method appears to ignore the when binding conditions. As demonstrated in the unit tests, when the storage-config value is set to a specific configuration (e.g., 'disk' or 'redis') and container.getAll<Storage>('storage') is called, it returns all bindings for the storage service (e.g., ['disk-storage', 'redis-storage']), regardless of the specified storage-config value.
Steps to reproduce
Unit tests reproducing the current behavior.
https://stackblitz.com/edit/vitest-dev-vitest-pw5pnz?file=test%2Fbasic.test.ts
Expected behavior
When the storage-config value is set to a specific configuration ('disk' or 'redis') and container.getAll<Storage>('storage') is called:
- For
'disk', only the'disk-storage'binding should be resolved. - For
'redis', only the'redis-storage'binding should be resolved.
Package version
6.1.6
nicholas-ly and notaphplover
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done