Skip to content

Commit

Permalink
test: remove unecessarly if
Browse files Browse the repository at this point in the history
Signed-off-by: Erick Wendel <erick.workspace@gmail.com>
  • Loading branch information
ErickWendel committed Nov 24, 2022
1 parent 00b2156 commit f076bf2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/internal/test_runner/mock.js
Expand Up @@ -134,9 +134,7 @@ class MockTracker {
) {
validateStringOrSymbol(methodName, 'methodName');
// In case object is a static class
if (typeof object === 'function') {
validateFunction(object, methodName);
} else {
if (typeof object !== 'function') {
validateObject(object, 'object');
}

Expand Down Expand Up @@ -175,7 +173,7 @@ class MockTracker {
}

return original;
};
}
let descriptor = ObjectGetOwnPropertyDescriptor(object, methodName);
let original = getOriginalObject(descriptor);

Expand Down

0 comments on commit f076bf2

Please sign in to comment.