Last active
February 13, 2016 17:12
-
-
Save edwinvdgraaf/e669854764b31b945b90 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
let normalB = require('b'); | |
let A = { | |
init(url, B = normalB){ | |
return B.fetch(url); | |
} | |
}; |
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
let A = require('a'); | |
// In regular code | |
A.init('google.com'); | |
// Under test | |
A.init('google.com', Bmock); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment