Skip to content

Commit

Permalink
a spy method should be enumerable
Browse files Browse the repository at this point in the history
  • Loading branch information
koba04 committed Jul 4, 2018
1 parent 899f222 commit 6fa1e9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/enzyme/src/Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export function spyMethod(instance, methodName) {
}
Object.defineProperty(instance, methodName, {
configurable: true,
enumerable: false,
enumerable: !descriptor || !!descriptor.enumerable,
value(...args) {
const result = originalMethod.apply(this, args);
lastReturnValue = result;
Expand Down

0 comments on commit 6fa1e9a

Please sign in to comment.