Supporting different module types

This commit is contained in:
Jeff Avallone committed 2019-03-24 13:47:34 -04:00
1 parent 4d31079ca2
commit 791142005e
1 file changed
+2 -2
+2 -2
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;