-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Hi @YegorZaremba ,
I am working on project with node,typeorm and my sql.I need to write unit test case for api's.we followed your sample project.But in my projects we have used query builder as follow
async checkMobilenumber(mobile:string){
let result : any = null;
try {
result = await getManager()
.getRepository(User)
.createQueryBuilder('user')
.where('user.mobile = :mobile')
.setParameters({ mobile: mobile })
.getOne();
} catch (error) {
logger.error('Error while execute query : ', error);
throw error;
}
return result;
};
I am requesting could you please help me how to write unit test case for above sample code.
Metadata
Metadata
Assignees
Labels
No labels