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 4670d3b commit bb28e79Copy full SHA for bb28e79
packages/jest-mock/src/index.ts
@@ -876,7 +876,7 @@ export class ModuleMocker {
876
const boundFunctionPrefix = 'bound ';
877
let bindCall = '';
878
// if-do-while for perf reasons. The common case is for the if to fail.
879
- if (name && name.startsWith(boundFunctionPrefix)) {
+ if (name.startsWith(boundFunctionPrefix)) {
880
do {
881
name = name.substring(boundFunctionPrefix.length);
882
// Call bind() just to alter the function name.
0 commit comments