On Saturday, June 30, 2012, P. Douglas Reeder wrote: > Module-level testing is important, but the definition of unit testing is > that you test individual functions.
So, put your functions in separate modules then. The definition of unit testing is testing units; in node, the module is the unit. I do sometimes put tests in the module that run when module===require.main, but it's a sloppy practice. > > JUnit allows you to define tests that have acces to Java package-private > methods, yet are excluded from production builds. > > -- > 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]<javascript:;> > To unsubscribe from this group, send email to > [email protected] <javascript:;> > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > -- 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
