Skip to content

v0.8.10 patch breaking Enzyme tests #225

@majapw

Description

@majapw

Specifically, setState seems unusable in tests after this. I have multiple repos, internal and external (https://travis-ci.org/airbnb/react-dates/jobs/213257781), breaking on this.

The specific error I'm seeing is:

ReferenceError: document is not defined
      at getActiveElement (node_modules/fbjs/lib/getActiveElement.js:27:16)
      at ReactReconcileTransaction.getSelectionInformation (node_modules/react-dom/lib/ReactInputSelection.js:37:23)
      at ReactReconcileTransaction.initializeAll (node_modules/react-dom/lib/Transaction.js:172:75)
      at ReactReconcileTransaction.perform (node_modules/react-dom/lib/Transaction.js:139:12)
      at ReactUpdatesFlushTransaction.perform (node_modules/react-dom/lib/Transaction.js:140:20)
      at ReactUpdatesFlushTransaction.perform (node_modules/react-dom/lib/ReactUpdates.js:89:32)
      at Object.flushBatchedUpdates (node_modules/react-dom/lib/ReactUpdates.js:172:19)
      at ReactDefaultBatchingStrategyTransaction.closeAll (node_modules/react-dom/lib/Transaction.js:206:25)
      at ReactDefaultBatchingStrategyTransaction.perform (node_modules/react-dom/lib/Transaction.js:153:16)
      at Object.batchedUpdates (node_modules/react-dom/lib/ReactDefaultBatchingStrategy.js:62:26)
      at Object.enqueueUpdate (node_modules/react-dom/lib/ReactUpdates.js:200:22)
      at enqueueUpdate (node_modules/react-dom/lib/ReactUpdateQueue.js:24:16)
      at Object.enqueueSetState (node_modules/react-dom/lib/ReactUpdateQueue.js:209:5)
      at CalendarMonthGrid.ReactComponent.setState (node_modules/react/lib/ReactComponent.js:63:16)
      at CalendarMonthGrid.componentWillReceiveProps (src/components/CalendarMonthGrid.jsx:113:10)
      at Context.<anonymous> (test/components/CalendarMonthGrid_spec.jsx:60:24)

@lelandrichardson

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions