Mocha tests are failing due to React update

RESOLVED FIXED in Firefox 53

Status

()

Firefox
Developer Tools: Console
P1
normal
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: nchevobbe, Assigned: nchevobbe)

Tracking

Trunk
Firefox 53
Points:
---

Firefox Tracking Flags

(firefox53 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Assignee)

Description

a year ago
Mocha test throws : 

     TypeError: (0 , _reactCompat.renderToStaticMarkup) is not a function
      at render (node_modules/enzyme/build/render.js:27:52)
      at Context.<anonymous> (new-console-output/test/components/console-api-call.test.js:33:23)

and :

     TypeError: (0 , _reactCompat.findDOMNode) is not a function
      at instHasClassName (node_modules/enzyme/build/MountedTraversal.js:66:43)
      at Array.<anonymous> (node_modules/enzyme/build/MountedTraversal.js:230:20)
      at node_modules/enzyme/build/Utils.js:240:18
      at findAllInRenderedTreeInternal (node_modules/enzyme/build/MountedTraversal.js:288:13)
      at findAllInRenderedTreeInternal (node_modules/enzyme/build/MountedTraversal.js:303:22)
      at findAllInRenderedTreeInternal (node_modules/enzyme/build/MountedTraversal.js:303:22)
      at findAllInRenderedTreeInternal (node_modules/enzyme/build/MountedTraversal.js:303:22)
      at treeFilter (node_modules/enzyme/build/MountedTraversal.js:313:10)
      at ReactWrapper.<anonymous> (node_modules/enzyme/build/ReactWrapper.js:62:12)
      at node_modules/enzyme/build/ReactWrapper.js:1190:21
      at Array.map (native)
      at ReactWrapper.flatMap (node_modules/enzyme/build/ReactWrapper.js:1189:32)
      at ComplexSelector.findWhereUnwrapped (node_modules/enzyme/build/ReactWrapper.js:61:18)
      at recurseSelector (node_modules/enzyme/build/ComplexSelector.js:52:37)
      at ComplexSelector.handleSelectors (node_modules/enzyme/build/ComplexSelector.js:114:22)
      at ComplexSelector.find (node_modules/enzyme/build/ComplexSelector.js:130:23)
      at ReactWrapper.find (node_modules/enzyme/build/ReactWrapper.js:519:37)
      at Context.<anonymous> (new-console-output/test/components/console-api-call.test.js:187:15)


This is probably caused by the React update made in Bug 1312236
Comment hidden (mozreview-request)

Comment 2

a year ago
mozreview-review
Comment on attachment 8816218 [details]
Bug 1321518 - Fix requireHelper for enzyme.

https://reviewboard.mozilla.org/r/96996/#review97220

::: devtools/client/shared/vendor/react-dom-server.js:1
(Diff revision 1)
> +/**

If we are only using this for node unit tests, can we include this in package.json instead of importing it as a vendor file and using the require-helper?

Comment 3

a year ago
mozreview-review
Comment on attachment 8816218 [details]
Bug 1321518 - Fix requireHelper for enzyme.

https://reviewboard.mozilla.org/r/96996/#review97228

This looks fine.  Please update the bottom of the REACT_UPGRADING file to include copying this file
Attachment #8816218 - Flags: review?(bgrinstead) → review+
Comment hidden (mozreview-request)

Comment 5

a year ago
Pushed by chevobbe.nicolas@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/7068e81c96ae
Fix requireHelper for enzyme. r=bgrins

Comment 6

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/7068e81c96ae
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox53: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 53
You need to log in before you can comment on or make changes to this bug.