We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a9c617 commit f9603f8Copy full SHA for f9603f8
src/commons/utils/TestUtils.ts
@@ -87,7 +87,9 @@ export function deepFilter<T>(
87
export function resolveImportInconsistency(json: any) {
88
// `json` doesn't inherit from `Object`?
89
// Can't use hasOwnProperty for some reason.
90
- if ('default' in json) {
+ const hasDefaultExport =
91
+ process.env.NODE_ENV === 'test' ? 'default' in json : json.hasOwnProperty('default');
92
+ if (hasDefaultExport) {
93
return json.default;
94
} else {
95
return json;
0 commit comments