Last active
March 29, 2018 12:13
-
-
Save theKashey/e156e46dd83e9dcb3aa59a3a3fa44954 to your computer and use it in GitHub Desktop.
mocked dooms-day
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
export const theDay = Promise.resolve(); |
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
export const Launch = jest.fn(); //this is "replacement" code |
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 {Launch} from './rocket-silo'; // magic! magic! | |
import {theDay} from 'doom-scheduler'; // might be not a great idea | |
import 'rocket-silo'; | |
expect(Launch).toHaveBeenCalled(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment