Created
March 29, 2018 11:49
-
-
Save theKashey/aa65f567bbc359123f4618978009b82c to your computer and use it in GitHub Desktop.
Rewiremock TD.js
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 rewiremock from 'rewiremock'; | |
const {Launch} = rewiremock('./rocket-silo').mockThrough(); // automock | |
const scheduler = rewiremock('doom-scheduler').with({ theDay: Promise.resolve() }) | |
rewiremock.proxy('./dooms-day.js'); | |
expect(Launch).toHaveBeenCalled(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment