Changelog
3.11.0
render
: handle Fiber strings and numbers (#2221)shallow
: Share child context logic between shallow
and dive
(#2296)mount
: children
: include text nodes ($2269)mount
: invoke
: use adapter’s wrapInvoke
if present (#2158)mount
/shallow
: closest
/parent
: Add missing arguments description (#2264)mount
/shallow
: fix pluralization of “exist” (#2262)shallow
/mount
: simulate
: added functional component example to simulate doc (#2248)mount
: debug
: add missing verbose option flag (#2184)mount
/shallow
: update
: fix semantics description (#2194)invoke
: Add missing backticks to end of codeblock (#2160)invoke
: Fix typo (#2167)funding
fieldis-boolean-object
, is-callable
, is-number-object
, is-string
, enzyme-shallow-equal
, array.prototype.flat
, function.prototype.name
, html-element-map
, is-regex
, object-inspect
, object-is
, object.entries
, object.vales
, raf
, string.prototype.trim
eslint
, eslint-plugin-import
, eslint-plugin-markdown
, eslint-plugin-react
, safe-publish-latest
, eslint-config-airbnb
, rimraf
, safe-publish-latest
, karma-firefox-launcher
, babel-preset-airbnb
, glob-gitignore
, semver
, eslint-plugin-jsx-a11y
Changelog
3.10.0
shallow
add suspenseFallback
option; support Suspense
/Lazy
(#1975)shallow
/mount
: add invoke(propName)(...args)
(#1856, #945)shallow
: Support rendering and dive()
ing createContext()
providers and consumers (#1966)mount
/shallow
: add getWrappingComponent
(#1960)Utils
: add isCustomComponent
(#1960)Utils
: add stub
argument to spyMethod
EnzymeAdapter
: add matchesElementType
(#2146)RSTTraversal
: add getHTMLFromHostNodes
selectors
: unwrap memo
elements - in both directions (#2146)shallow
: properly determine "should render" for PureComponent
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)ReactWrapper
/ShallowWrapper
: ensure calling an adapter‘s nodeToElement preserves the receivermount
: use getHTMLFromHostNodes
shallow
: fix childAt (#2134)debug
: Added documentation for verbose
flag (#2104)reduce
/reduceRight
: fix example code (#2066, #2065, #2064)simulateError
with getDerivedStateFromError
(#2036)shallow
: .hasClass
: fix use of mount
jest
: Update deprecated jest config key (#2024)Changelog
3.9.0
shallow
: isEmptyRender
: allow on multiple elements (#1924)mount
: support :focus
selector (#1965)shallow
: Support getChildContext()
(#1971)shallow
/mount
: .find
: find HTML elements by their constructor (#1933)shallow
/mount
: selectors
: support universal selector (#1945)mount
/shallow
: add regex support to .hasClass
(#1987)mount
/shallow
: .text
/.html
: handle an array of nodes properly (#2001)shallow
: .setProps()
: only call cDU once (#2007)mount
: ensure findWhere
doesn‘t abort early on an empty string (#1995)mount
: findWhere
: avoid passing empty wrappers to predicatemount
: text()
via findWhere
: return the string for a wrapper around a stringmount
/shallow
: Fix .exists not accepting any EnzymeSelector (#1934)mount
: Recursive isEmptyRender
(#1924)mount
: setState
: allow setting state on a class child of an SFC rootsetupTestFrameworkScriptFile
to setupFilesAfterEnv
(#2013)mount
: setState
: note that you can now call it on "not the root" (#2010)isEmptyRender
, renderProp
, equals
, SystemJS guide (#1984, #1985)Changelog
3.8.0
shallow
/mount
: add renderProp
(#1863, #1891)shallow
/mount
: improve error message for "single node" assertion (#1904)shallow
: shallow compare, not deep compare, state and props to determine rerendering (#1915)shallow
: dive
: add a note about throwing an error (#1905)selectors: update re
displayName` (#1932)shallow
: get
: fixed wrong props()
usage (#1921)shallow
: html
: shallow renders full tree (#1912)prop
: fix typo (#1883)mount
: ref
: use correct type (#1865)Changelog
3.7.0
mount
: .state()
/.setState()
: allow calling on children (#1802, @ljharb)configuration
: add reset
(commit)makeOptions
: ensure that config-level attachTo
/hydrateIn
are inherited into wrapper options (#1836, @ljharb)shallow
/Utils
: call into adapter’s isCustomComponentElement
if present (#1832, @SinHouse)shallow
/mount
: throw an explicit error when state is null/undefined (commit)ROOT_NODES
for child wrappers (#1811, @jgzuke)shallow
: .parents
: ensure that one .find
call does not affect another (#1781, @ljharb)mount
: update after simulateError
(#1812, @jgzuke)mount
/shallow
: getElement
: use this.single
(commit)Changelog
3.5.0
shallow
: prevent rerenders with PureComponents (#1786, @koba04)shallow
: skip updates when nextState is null
or undefined
(#1785, @koba04)shallow
: setState
after setProps
calls componentWillReceiveProps
(#1779, @peanutenthusiast)mount
/shallow
: be stricter on the wrapper’s setState/setProps callback (commit)shallow
/mount
: improve error message when wrapping invalid elements (#1759, @jgzuke)Changelog
3.4.3
shallow
: .setState()
: stub out setState
on non-root code paths as well (#1763)shallow
/mount
: restore fallback when adapter lacks invokeSetStateCallback
(commit)mount
: setState
: invoke callback with the proper receiver (commit)mount
: state
and setState
should throw an explicit error message when called on an SFC (commit)