Closed lakshnachadha closed 4 years ago
Your're trying to inject SECRET_MANAGER_SERVICE
in src/services/secrets-manager/secrets.provider.ts
: inject: [getSecretsManagerToken(secretsManagerServiceFeatureOptions.id)],
But it's not injected any where.
Your're trying to inject
SECRET_MANAGER_SERVICE
insrc/services/secrets-manager/secrets.provider.ts
:inject: [getSecretsManagerToken(secretsManagerServiceFeatureOptions.id)],
But it's not injected any where.
SecretManagerServiceModule.forRoot function exports SECRET_MANAGER_SERVICE provider. i have follewed the same structure as nestjs/mongoose library
What are you trying to achieve with your test? forRoot
or forFeature
should be used independently, not together - SECRET_MANAGER_SERVICE should be provided at the module level, they are not shared cross modules, you have to either import its containing module or inject it somehow.
Since its a test case, you should provide it manually in your test with .overrideProvider
and .useValue
.
Either case this is not a bug with nestjs.
Please, use our Discord channel (support) for such questions. We are using GitHub to track bugs, feature requests, and potential improvements.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Bug Report
Current behavior
Getting below error
Input Code
Please find attached code aws.zip
tests/unit/services/secrets-manager/secrets-manager.module.spec.ts Below Test case not able to resolve dependency
Expected behavior
this test case should be passed
Possible Solution
Environment