diff --git a/fixtures/tracing/script.js b/fixtures/tracing/script.js index 48d98308eac..7210d39e6ac 100644 --- a/fixtures/tracing/script.js +++ b/fixtures/tracing/script.js @@ -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'; }