-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
1,238 additions
and
1,392 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Taken from https://stackoverflow.com/a/77157708 to get around errors like | ||
// `TypeError: Cannot redefine property: searchSimilarFailures` when using | ||
// jest.spyOn when upgrading to node 14.2.16. | ||
// The following Object.defineProperty wrapper will ensure that all esModule exports | ||
// are configurable and can be mocked by Jest. | ||
const objectDefineProperty = Object.defineProperty; | ||
Object.defineProperty = function <T>( | ||
obj: T, | ||
propertyName: PropertyKey, | ||
attributes: PropertyDescriptor & ThisType<any> | ||
): T { | ||
if ((obj as { __esModule?: true })["__esModule"]) { | ||
attributes = { ...attributes, configurable: true }; | ||
} | ||
return objectDefineProperty(obj, propertyName, attributes); | ||
}; | ||
|
||
export {}; |
Oops, something went wrong.