Skip to content

ReferenceError: requestAnimationFrame is not defined #185

@markbrown4

Description

@markbrown4

Version

1.3.0

I'm using mocha / enzyme / jsdom to run tests which incude the <Typeahead> and am getting

ReferenceError: requestAnimationFrame is not defined at Object.componentDidMount (node_modules/react-bootstrap-typeahead/lib/Overlay.react.js:71:37)

I tried faking it with global.requestAnimationFrame = function(cb) { cb(0) } but looks like there's other issues, the test just hangs and I haven't found the cause yet.

I haven't found a version of jsdom which polyfills requestAnimationFrame, have you got a test using these packages to work? The previous versions of the package did run correctly.

There's also three warnings from this package:

Warning: ReactTestUtils has been moved to react-dom/test-utils. Update references to remove this warning.
Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead.
Warning: Portal: React.createClass is deprecated and will be removed in version 16. Use plain JavaScript classes instead. If you're not yet ready to migrate, create-react-class is available on npm as a drop-in replacement.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions