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

TypeMoq stops recording mocked invocations after 3 times #140

Open
peterwbeck opened this issue Oct 27, 2021 · 0 comments
Open

TypeMoq stops recording mocked invocations after 3 times #140

peterwbeck opened this issue Oct 27, 2021 · 0 comments

Comments

@peterwbeck
Copy link

peterwbeck commented Oct 27, 2021

Background
My target class is constructed with a UnitOfWorkFactory instance. This instance encapsulates a reusable piece of code for creating transactions in TypeORM. This is done within the trans method. The trans method takes an async lambda and executes it within a transactional context.

Issue
When the trans method is mocked and a callback is setup to manually execute the async lambda parameter, any other executions of mocked services inside of the async lambdas are not counted after the 3rd invocation.

JSFiddle link here https://jsfiddle.net/peterwbeck/t271b630/

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

1 participant