Fix tracing fixture (#14917)

This commit is contained in:
Dan Abramov
2019-02-21 18:14:32 +00:00
committed by GitHub
parent 8c1966590a
commit 219ce8a9cc

View File

@@ -36,7 +36,8 @@ function checkSchedulerAPI() {
throw 'API is not defined';
}
if (Scheduler.unstable_now() !== performance.now()) {
const abs = Math.abs(Scheduler.unstable_now() - performance.now());
if (typeof abs !== 'number' || Number.isNaN(abs) || abs > 5) {
throw 'API does not work';
}