Closed mohametdiatta closed 10 months ago
Bump
I suppose you could service, inject redis into that, and go through that interface, however we would like to directly inject a redis instance into our E2E tests instead.
We can create a discussion about it in the discussions section.
A bit specific, but in case anyone can use it:
By having access to the compiled module in the init method of our test suites:
const builder = Test.createTestingModule({ imports: [AppModule], });
...
const module: TestingModule = await builder.compile();
We could get access to redis with by using the getRedisToken
from @songkeys/nestjs-redis
:
module.get(getRedisToken('default'));
How can i the redis instance in my unit test