I've got an object named UserRepository which has a method named find which 
uses node-mysql to fetch rows from the database and I'm confused on how to 
test this code. I've tried reading about mocks but I still can't figure out 
exactly how to test the code. How do you  test code which talks to a 
database?

I've also read "only mock what you own" and since I don't own node-mysql 
client I'm not sure what to do.

Would really appreciate examples.

Thanks,

-Martin

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to