Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
i've got it!
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
You can’t perform that action at this time.