Skip to content
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

getting dependency error while running unit tests in nestjs #522

Open
jayanth-caw opened this issue Dec 7, 2022 · 1 comment
Open

getting dependency error while running unit tests in nestjs #522

jayanth-caw opened this issue Dec 7, 2022 · 1 comment

Comments

@jayanth-caw
Copy link

Nest can't resolve dependencies of the SkillService (?, Symbol(SkillRepositorySymbol), CalLoggerService). Please make sure that the argument automapper:nestjs:default at index [0] is available in the RootTestModule context.

Potential solutions:
- If automapper:nestjs:default is a provider, is it part of the current 

RootTestModule?
- If automapper:nestjs:default is exported from a separate @module, is that module imported within RootTestModule?
@module({
imports: [ /* the Module containing automapper:nestjs:default */ ]
})

  at TestingInjector.lookupComponentInParentModules (../node_modules/@nestjs/core/injector/injector.js:241:19)
  at TestingInjector.resolveComponentInstance (../node_modules/@nestjs/core/injector/injector.js:194:33)
  at TestingInjector.resolveComponentInstance (../node_modules/@nestjs/testing/testing-injector.js:16:45)
  at resolveParam (../node_modules/@nestjs/core/injector/injector.js:116:38)
      at async Promise.all (index 0)
  at TestingInjector.resolveConstructorParams (../node_modules/@nestjs/core/injector/injector.js:131:27)
  at TestingInjector.loadInstance (../node_modules/@nestjs/core/injector/injector.js:57:13)
  at TestingInjector.loadProvider (../node_modules/@nestjs/core/injector/injector.js:84:9)
      at async Promise.all (index 3)
@zgid123
Copy link
Contributor

zgid123 commented Dec 13, 2022

can you provide an example repo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants