-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
feat: return value from UseRequestContext callback #28
Conversation
thanks, can you please add some basic tests to verify it works and ensure we dont break it? |
Yes, of course, I will try next week |
e960f81
to
e40ee8a
Compare
@@ -29,12 +29,12 @@ class ConfigService implements MikroOrmOptionsFactory { | |||
@Module({ providers: [ConfigService, myLoggerProvider], exports: [ConfigService] }) | |||
class ConfigModule { } | |||
|
|||
const getEntityManagerLoop = async (module: TestingModule): Promise<Set<string>> => { | |||
const getEntityManagerLoop = async (module: TestingModule): Promise<Set<number | string>> => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const getEntityManagerLoop = async (module: TestingModule): Promise<Set<number | string>> => { | |
const getEntityManagerLoop = async (module: TestingModule): Promise<Set<string>> => { |
// this function mocks the contextId factory which is called on each request | ||
// it's looped 5 times and resolves the EntityManager provider 10 times | ||
// set only allows unique values, it should only return 5 items as it should resolve the same em with the same contextId | ||
|
||
const generatedIds = new Set<string>(); | ||
const generatedIds = new Set<number | string>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const generatedIds = new Set<number | string>(); | |
const generatedIds = new Set<string>(); |
looks like i dont have write access to your fork, so please either rebase this and remove the conflicting changes in |
thanks! |
My pleasure |
Fixes: #21