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 899f222 commit 6fa1e9aCopy full SHA for 6fa1e9a
packages/enzyme/src/Utils.js
@@ -254,7 +254,7 @@ export function spyMethod(instance, methodName) {
254
}
255
Object.defineProperty(instance, methodName, {
256
configurable: true,
257
- enumerable: false,
+ enumerable: !descriptor || !!descriptor.enumerable,
258
value(...args) {
259
const result = originalMethod.apply(this, args);
260
lastReturnValue = result;
0 commit comments