skiadas / PanthR

Statistics front-end and webserver with R connection
1 stars 2 forks source link

Add basic module test at the end of db.js #47

Closed skiadas closed 11 years ago

skiadas commented 11 years ago

Anything enclosed in:

if (require.main === module) { ... code here }

is only executed when you run "node.js db.js". It can be used for some basic checks. You should have appropriate code there to wait for instantiation, to create an object, to wait for the created object, to update it etc.

phamd1989 commented 11 years ago

PubSub.subscribe() didn't exit after calling createUser()