Remove Scheduler.log from ReactSuspenseFuzz-test (#28812)

These test don't `assertLog` or `waitFor` so we don't need to
`Scheduler.log`. Ideally we would, but since they're fuzzers it's a bit
difficult to know what the expected log is from the helper.

Since this doesn't regress current test behavior, we can improve them
after this to unblock https://github.com/facebook/react/pull/28737
This commit is contained in:
Ricky
2024-04-10 11:40:22 -04:00
committed by GitHub
parent 84cb3b4cb2
commit bf09089f64
@@ -115,24 +115,19 @@ describe('ReactSuspenseFuzz', () => {
setTimeout(() => {
cache.set(fullText, fullText);
pendingTasks.delete(task);
Scheduler.log(task.label);
resolve();
}, delay);
},
};
cache.set(fullText, thenable);
Scheduler.log(`Suspended! [${fullText}]`);
throw thenable;
} else if (typeof resolvedText.then === 'function') {
const thenable = resolvedText;
Scheduler.log(`Suspended! [${fullText}]`);
throw thenable;
throw resolvedText;
}
} else {
resolvedText = fullText;
}
Scheduler.log(resolvedText);
return resolvedText;
}