@samitouri / QOS-React / commits / bf09089f64

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

Ricky committed Apr 10, 2024 at 11:40 UTC bf09089f64cec31680b0bb63b2ebaa81e210c492
1 file changed +1 -6
packages/react-reconciler/src/__tests__/ReactSuspenseFuzz-test.internal.js
+1 -6
@@ -115,24 +115,19 @@ describe('ReactSuspenseFuzz', () => {
115 setTimeout(() => {
116 cache.set(fullText, fullText);
117 pendingTasks.delete(task);
118 - Scheduler.log(task.label);
118 resolve();
119 }, delay);
120 },
121 };
122 cache.set(fullText, thenable);
124 - Scheduler.log(`Suspended! [${fullText}]`);
123 throw thenable;
124 } else if (typeof resolvedText.then === 'function') {
127 - const thenable = resolvedText;
128 - Scheduler.log(`Suspended! [${fullText}]`);
129 - throw thenable;
125 + throw resolvedText;
126 }
127 } else {
128 resolvedText = fullText;
129 }
130
135 - Scheduler.log(resolvedText);
131 return resolvedText;
132 }
133