Hi all

I'm trying to use nodeunit for asynchronous testing,

my code is like:

var svr = require("mysvr")
  ;
svr.listen(5353);
module.exports =
  { login:
    function(is) {
       svr.login( { usr: "u", pwd: "p" }
       , function(err, res){
            is.ok(!err);
            is.done();
         }
       );
    }
  }


my test runner is like:

var reporter = require('nodeunit').reporters.verbose
  ;

//TODO - get list of files from conventional folder structure
// or traverse folder tree for name convention...
reporter.run(
  ['ua.js'
//  ,'test2.js'
  ]
);


However, running it throws an error of undone tests:

D:\ws\OSGE\1000\sources\auth>node run_tests.js

*ua.js*

FAILURES: Undone tests (or their setups/teardowns):
- login

To fix this, make sure all tests call test.done()



Now, the server works. No doubt about it.
I'm trying to automate the tests.
I fiddled a little with expresso, but I would feel better with *nodeunit*,
if we could get it work...

Help anyone?

Osher

-- 
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