Created
August 26, 2014 18:20
-
-
Save OscarGodson/0f9d78e91415cd2e34f6 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
var Foo = require('../foo/index.js'); | |
var someClass = new SomeClass({ | |
someMethod: function () { | |
// How do I stub this without requiring it to be set on the prototype? | |
// ex: w/o having it set on someClass.baz = Foo.bar(); | |
var baz = Foo.bar(); | |
if (baz == 'hello') { | |
return 1 | |
} | |
else { | |
return 0 | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note that the karma example above is relying on a key karma plugin, or at least my fork of it: https://github.com/jmreidy/karma-browserifast