Created
September 23, 2010 13:58
-
-
Save karlbohlmark/593645 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var vows = require('vows'), | |
assert = require('assert'), | |
EventEmitter = require('events').EventEmitter, | |
myEventEmitter = new EventEmitter() | |
var A = function(){} | |
// Create a Test Suite | |
vows.describe('Testing and EventEmitter').addBatch({ | |
'when the topic is a regular object':{ | |
topic: new A(), | |
'the test gets executed' : function(topic){ | |
assert.isNotNull(topic) | |
} | |
}, | |
'when the topic is an EventEmitter': { | |
topic: myEventEmitter, | |
'The test is never executed': function (topic) { /*not fired!*/ | |
assert.isNotNull(topic); | |
} | |
} | |
}).run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment