Last active
December 16, 2015 14:09
-
-
Save timkim/5446966 to your computer and use it in GitHub Desktop.
This file contains hidden or 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('should receive the correct request', function(){ | |
var mySpy = spyOn(http, 'get'); | |
// need this to get around the 'on' function callback beind undefined in plugins.js | |
mySpy.on = function(){}; | |
plugins.getPluginInfo('ChildBrowser', function(error, plugin) { | |
}); | |
expect(mySpy).toHaveBeenCalledWith('https://github.com/imhotep/ChildBrowser'); | |
}); | |
This is the error: | |
Failures: | |
1) plugins server should receive the correct request | |
Message: | |
TypeError: Cannot call method 'on' of undefined | |
Stacktrace: | |
TypeError: Cannot call method 'on' of undefined | |
at Object.module.exports.getPluginInfo (/Users/timkim/repo/plugman/src/util/plugins.js:49:12) | |
at null.<anonymous> (/Users/timkim/repo/plugman/spec/util/plugins.spec.js:35:21) | |
at jasmine.Block.execute (/Users/timkim/repo/plugman/node_modules/jasmine-node/lib/jasmine-node/jasmine-1.3.1.js:1064:17) | |
at jasmine.Queue.next_ (/Users/timkim/repo/plugman/node_modules/jasmine-node/lib/jasmine-node/jasmine-1.3.1.js:2096:31) | |
at jasmine.Queue.start (/Users/timkim/repo/plugman/node_modules/jasmine-node/lib/jasmine-node/jasmine-1.3.1.js:2049:8) | |
at jasmine.Spec.execute (/Users/timkim/repo/plugman/node_modules/jasmine-node/lib/jasmine-node/jasmine-1.3.1.js:2376:14) | |
at jasmine.Queue.next_ (/Users/timkim/repo/plugman/node_modules/jasmine-node/lib/jasmine-node/jasmine-1.3.1.js:2096:31) | |
at jasmine.Queue.start (/Users/timkim/repo/plugman/node_modules/jasmine-node/lib/jasmine-node/jasmine-1.3.1.js:2049:8) | |
at jasmine.Suite.execute (/Users/timkim/repo/plugman/node_modules/jasmine-node/lib/jasmine-node/jasmine-1.3.1.js:2521:14) | |
at jasmine.Queue.next_ (/Users/timkim/repo/plugman/node_modules/jasmine-node/lib/jasmine-node/jasmine-1.3.1.js:2096:31) | |
Finished in 3.178 seconds | |
5 tests, 7 assertions, 1 failure |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment