Closed
Description
As of https://github.com/testing-library/react-testing-library/pull/732/files we're seeing:
TypeError: callback is not a function
at <Jasmine>
at scheduleFn (webpack:///node_modules/@testing-library/react/dist/@testing-library/react.esm.js:230:1 <- tests.webpack.js:27483:12)
at scheduleCallback (webpack:///node_modules/@testing-library/react/dist/@testing-library/react.esm.js:232:1 <- tests.webpack.js:27485:46)
at Object.then (webpack:///node_modules/@testing-library/react/dist/@testing-library/react.esm.js:245:1 <- tests.webpack.js:27498:9)
Looking at that PR it seems to have two sources of truth: isModernScheduleCallbackSupported based on the react version and NormalPriority based on the existence of Scheduler.
isModernScheduleCallbackSupported seems to be true yet Scheduler undefined.
Which causes it to call scheduleFn(NormalPriority, cb)
rather than scheduleFn(cb)
. And scheduleFn is callback => callback()
.