Supporting different module types
This commit is contained in:
parent
4d31079ca2
commit
791142005e
@ -12,8 +12,8 @@ const buildMock = component => {
|
||||
};
|
||||
|
||||
module.exports = path => {
|
||||
const actual = jest.requireActual(path).default;
|
||||
return buildMock(actual);
|
||||
const actual = jest.requireActual(path);
|
||||
return buildMock(actual.default || actual);
|
||||
};
|
||||
|
||||
module.exports.buildMock = buildMock;
|
||||
|
Loading…
Reference in New Issue
Block a user