liaoliaots/nestjs-redis

Nest can't resolve dependencies of the RedisManager inside Jest test

melishev opened this issue · 0 comments

Hi

I am trying to write Jest tests and use as useValue: redis-memory-server. But I get errors like

Nest can't resolve dependencies of the RedisManager (?). Please make sure that the argument Symbol() at index [0] is available in the RootTestModule context.

    Potential solutions:
    - If Symbol() is a provider, is it part of the current RootTestModule?
    - If Symbol() is exported from a separate @Module, is that module imported within RootTestModule?
      @Module({
        imports: [ /* the Module containing Symbol() */ ]
      })

Maybe you have an idea how to fix it?
If needed, I can provide my jest file.

  • Version used: 8.2.2
  • NestJS version: 8.0.0
  • Node.js version: 16.15.0
  • Operating System and version (macOS, Windows, Linux): macOS