Last active
March 29, 2018 11:46
-
-
Save theKashey/05144bfab38e0af6eecbe3044a4a7168 to your computer and use it in GitHub Desktop.
dooms-day proxyquire
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
import proxyquire from 'proxyquire'; | |
import sinon from 'sinon'; | |
const Launch= sinon.stub() | |
const case = proxyquire.load('./dooms-day.js',{ | |
'./rocket-silo', { Launch }, | |
'doom-scheduler', { theDay: Promise.resolve() | |
}); | |
expect(Launch).toHaveBeenCalled(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment