Last active
March 29, 2018 12:15
-
-
Save theKashey/92bbd646cc5bf97b48cac28e4ef93596 to your computer and use it in GitHub Desktop.
jest.mock the 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
import {Launch} from './rocket-silo'; | |
import {theDay} from 'doom-scheduler' | |
import 'rocket-silo'; | |
jest.mock('./rocket-silo'); // mocking something we already imported!!! | |
jest.mock('doom-scheduler'); | |
theDay.mockResolvedValue("comming!"); | |
expect(Launch).toHaveBeenCalled(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment