Closed
Description
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
It seems the way to create a mock with a factory doesn't work inside test
or it
. It works only when the mock is defined at the root level of the file.
Here's my example of a mock:
jest.mock('services/feature', () => ({
isEnabled: () => true
}));
What is the expected behavior?
Mocking a file inside a test should work.
Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
Jest 18.0.0, Node 7.4, macOS