From cb4ea65bc8d6b1c72883a84c110928f04c50e4ea Mon Sep 17 00:00:00 2001 From: brianc Date: Tue, 19 Oct 2010 22:58:25 -0500 Subject: [PATCH] ability to ignore tests by returning false --- test/unit/test-helper.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/test/unit/test-helper.js b/test/unit/test-helper.js index 8674ac4c..aee8409c 100644 --- a/test/unit/test-helper.js +++ b/test/unit/test-helper.js @@ -48,10 +48,10 @@ test = function(name, action) { name = ' ' + name; } test.tabout += 2; - process.stdout.write('.'); + try{ global.TEST_RESULTS.testCount++; - action(); + process.stdout.write( action() === false ? '?' : '.'); }catch(e) { console.log(''); console.log(name); @@ -91,3 +91,12 @@ var p = MemoryStream.prototype; p.write = function(packet) { this.packets.push(packet); }; + +createClient = function() { + var stream = new MemoryStream(); + stream.readyState = "open"; + var client = new Client({ + stream: stream + }); + client.connect(); +};