Enzyme v3.10.0 Release Notes
Release Date: 2019-06-03 // almost 5 years ago-
🆕 New Stuff
shallow
addsuspenseFallback
option; supportSuspense
/Lazy
(#1975)shallow
/mount
: addinvoke(propName)(...args)
(#1856, #945)shallow
: Support rendering anddive()
ingcreateContext()
providers and consumers (#1966)mount
/shallow
: addgetWrappingComponent
(#1960)Utils
: addisCustomComponent
(#1960)Utils
: addstub
argument tospyMethod
EnzymeAdapter
: addmatchesElementType
(#2146)RSTTraversal
: addgetHTMLFromHostNodes
🛠 Fixes
selectors
: unwrapmemo
elements - in both directions (#2146)shallow
: properly determine "should render" forPureComponent
s (#2096)mount
/shallow
:renderProp
: improve error messages (#2070)mount
:setContext
: use proper wrapper name in error messageshallow
:.contains()
: clean up error messageshallow
/mount
:hasClass
: avoid a crash with a non-string argument (#2057)mount
: properly handle HTML of multiple nodes (#2052)shallow
: ensure that if gDSFP exists, cDU is called. (#2027)shallow
: Mock sCU if gDSFP defined in shallow renderer rerender (#1981)mount
:.state()
: allow getting state from stateful children of a stateless root (#2043)mount
:.text()
: properly recurse through fragments and arrays (#2028)
🔨 Refactors
ReactWrapper
/ShallowWrapper
: ensure calling an adapter‘s nodeToElement preserves the receivermount
: usegetHTMLFromHostNodes
📄 Docs
- explain why need to re-call .find() after update (#2140)
shallow
: fix childAt (#2134)- Update v2 -> v3 migration guide re props after a stage change (#1300)
debug
: Added documentation forverbose
flag (#2104)- Add on the fly JSDOM include example (#2072)
reduce
/reduceRight
: fix example code (#2066, #2065, #2064)- update
simulateError
withgetDerivedStateFromError
(#2036) shallow
:.hasClass
: fix use ofmount
- add link to Cheerio API and another example (#756)
jest
: Update deprecated jest config key (#2024)