Help mocking TypeORM's QueryBuilder. #600
Unanswered
JoaoVictorDaijo
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to test a method which executes a query using TypeORM's createQueryBuilder. I got the usual Nest setup on my provider, I inject my repository and create a queryBuilder using it.
This is how I'm trying to mock the queryBuilder and it's internal methods:
When I run this simple it case:
I get this error:
TypeError: Cannot read properties of undefined (reading 'leftJoin')
Beta Was this translation helpful? Give feedback.
All reactions