@samitouri / QOS-React / commits / 219ce8a9cc

Fix tracing fixture (#14917)

Dan Abramov committed Feb 21, 2019 at 18:14 UTC 219ce8a9ccf4b61a2e28cbb0494eee4ad15868f4
1 file changed +2 -1
fixtures/tracing/script.js
+2 -1
@@ -36,7 +36,8 @@ function checkSchedulerAPI() {
36 throw 'API is not defined';
37 }
38
39 - if (Scheduler.unstable_now() !== performance.now()) {
39 + const abs = Math.abs(Scheduler.unstable_now() - performance.now());
40 + if (typeof abs !== 'number' || Number.isNaN(abs) || abs > 5) {
41 throw 'API does not work';
42 }
43