Created
March 20, 2014 15:27
-
-
Save aoberoi/9666352 to your computer and use it in GitHub Desktop.
i've got it!
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
it('complains when the p2p or location values are not valid', function(done) { | |
var self = this; | |
// YAY higher order programming :) | |
var expectError = function(cb) { | |
return function(err, result) { | |
expect(err).to.be.an.instanceof(Error); | |
cb(null) | |
}; | |
}; | |
async.parallel([ | |
function(cb) { | |
self.opentok.createSession({ p2p: 'lalalal' }, expectError(cb)) | |
}, | |
function(cb) { | |
self.opentok.createSession({ location: 'not an ip address' }, expectError(cb)) | |
} | |
], done); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment