Supporting different module types

This commit is contained in:
Jeff Avallone 2019-03-24 13:47:34 -04:00
parent 4d31079ca2
commit 791142005e

View File

@ -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;