- Fix a typescript conflict with a recent Jest update. (@tobilen)
- Internal cleanup with jest compatibility. (@vkrol)
- Internal updates to latest Babel and Jest. (@vkrol)
- Fix documentation linking issues (@harrykiselev)
- Fix a flowtype regression. (@bz2)
- Improve infra to prevent further flowtype regressions. (@bz2)
toContainMatchingElement
andtoContainMatchingElements
now can take a list of Enzyme wrappers. (@GreenGremlin)- Improved messaging for
toContainMatchingElement
andtoContainMatchingElements
. (@GreenGremlin)
- Update a security advisory within dependencies. (@tgaff)
- Various package improvements. (@goldensunliu, @mulholio, @kahwee, @tgaff)
- Fixing messaging for
toHaveState
andtoHaveProp
. (@GreenGremlin)
- Fix a jest integration with
toContainMatchingElement
not returning an explicit boolean. (@blainekasten)
π Breaking
- Renamed
toHaveTagName
totoHaveDisplayName
(GreenGremlin)- This was done because Tag name indicates an HTML entity, but the matcher works with React Components which uses an internalProp
displayName
- When updating to 7.0.0 you should be able to just do a simple search and replace for this matcher across your codebase.
- This was done because Tag name indicates an HTML entity, but the matcher works with React Components which uses an internalProp
πΎ Improvements
- Add support for unboxed properties for
toMatchElement
. (@blainekasten) - Improve documentation for the entire repo. (@blainekasten)
- Improve internal tests.
- Try to fix a failed publish. (@blainekasten)
- Fix duplicate typescript definition. (@GreenGremelin)
- Added 3 new matchers!
toContainMatchingElement
,toContainMatchingElements
andtoContainMatchingElements
(@GreenGremlin)
- Fix typescript definitions for
toMatchElement
options argument. (@mayhewluke)
- Fix global typescript definitions for jest-environment-enzyme. (@vkrol)
- Add global typescript definitions for jest-environment-enzyme. (@astorije)
- Allow multiline strings for
toHaveHTML
. (@astorije) - Print local error messages when jest-environment-enzyme has an issue. (@h.ayabe)
- Loosen
jest-envirnoment-enzyme
react peerDependency to support testing other react versions. (@evocateur)
- Fix
jest-environment-enzyme
to actually work with different react adapter versions. (@evocateur)
π Breaking
jest-environment-enzyme
now requires you to install your enzyme-adapter to your project root. (@blainekasten)- In 5.0.0 we wrongfully didn't require developers to do that hoping we could manage it internally.
- This resulted in bloated dependencies, and peerDependency errors.
- This fix requires a tiny bit more work from the user but is correct!
πΎ Improvements
- Improve
jasmine-enzymes
error messages to not be contradicting. (@blainekasten)
- Fix an internal flowtype issue. (@fernandopasik)
- Improve the scope of what files
eslint-config-jest-enzyme
affects. (@blainekasten)
- Remove unnecassary rAF polyfill. (@SimenB)
- Fix flow typing for
toHaveProp
. (@theneva) - Remove unused dependency from
jest-environment-enzyme
. (@SimenB)
π Breaking
- Removed
toBePresent
andtoBeEmpty
in favor of a new matchertoExist
. (@blainekasten)
π New Features
- New Package!
jest-environment-enzyme
(@blainekasten) - New Package!
eslint-config-jest-enzyme
(@blainekasten) - New Matcher
toBeEmptyRender
to assert when a component returnsnull
orundefined
. (@theneva) toHaveStyle
,toHaveProp
andtoHaveState
now all can accept an object as a list of key,values to match against. (@blainekasten)- Using
yarn
workspaces locally now. (@blainekasten)
πΎ Improvements
- Improved error message when using an
enzyme-matcher
assertion with a non-enzyme argument. (@blainekasten) - Improve the message output from
toHaveClassName
. (@theneva) toBeChecked
previously failed on undefined or null values, but is now fixed. (@pascalduez)
- Handle an array of styles in the
toHaveStyle
assertion (@dennis-tra)
- Transfer ownership to FormidableLabs
- Internal CI fixes (@blainekasten)
- Minor:
toMatchElement
ignores props by default now. This should not break anyones existing tests. If it does, please report it. If you want to test an element without matching the props, pass{ ignoreProps: false }
as a second argument. (@finnigantime)
- Update enzyme-to-json to support React 16.2 (@rtymchyk)
- Remove the dependency on @types/react (@Vinnl)
- Support React 16 and Enzyme 3 (@blainekasten)
- Remove beforeEnter call for jest-enzyme and just add the matchers once. (@mockdeep)
- Fix missing flow annotation that caused issues with flow 0.54. (@fabiob)
- Fix flow issues that cropped up from 3.8.1. (@blainekasten)
- Fix a bug that prevents this library from working with Jest 21+. (@nigelzor)
- Intentionally passing undefined to toHaveState and toHaveProps now compares on the undefined value. (@DianaSuvorova)
- Fix pretty printing Proxy objects in components (@chris-divvito)
- Fix negative messages in jasmine-enzyme (@blainekasten)
- Address some internal issues that broke tests in CI (@blainekasten)
- Fix a bad publish with 3.6.0 not including all documented changes
- Implement jest asymettric matchers and jasmine partial matchers!! (@sfargier)
- This means you can use API's like
expect.any(String)
in jest orjasmine.stringMatching('%')
- This means you can use API's like
- Fix a bug with the transpiled code not runnable in browsers (@ek5000)
- Make the typescript definition for jest-enzyme more accurate (@sfargier)
- internal: enzyme-matchers is built in Prettier now! (@blainekasten)
- internal: Fix a local issue with our yarn.lock (@blainekasten)
- Point to lib TS file (@pascalduez)
- Add the missing export of the toMatchElement assertion (@vkrol)
- Fix the TS definition for
toContainReact
(@pselden)
- Include TS definitions in exported library (@Dean177)
- Fix a bug that can occur when you are mocking console.error in your tests. (@juanca)
- [internal] Use babel-preset-env (@pascalduez)
- [internal] Improve flowtype usage (@pascalduez)
- Add toMatchElement TS Declaration (@pascalduez)
- Prevented
toHaveProps
from mutating arguments (@moredip) - Ensure flowtypes are published as part of the packages (@pascalduez)
- Fix typescript return types (@Dean177)
- Fix Flowtype integration by not publishing
src/
files (@SBoudrias) - NEW! Added
toMatchElement(reactInstance)
matcher (@finnigantime)
- Publish types for Flow integration support
- Fix an issue where
console
may not be available in certain environments - Expose matchers directly for
jasmine-enzyme
- This is particularily benefecial for jasmine v1 users
- Access if found at
jasmineEnzyme.enzymeMatchers
- Fix an issue with using shallow wrappers when running tests in IE
- Fix a bug when running tests in IE
- Add Typescript definitions
- Fix a failed version publish
- This version updates the requirement for jest-enzyme to jest versions 19 or greater
- Automatically inject a serializer for enzyme components to be snapshotted
- Bugfix: Prevent shallow wrappers from being deeply rendered by our internal
html
utils
- Remove dependency on colors package
- Fix stringify to not crash on
null
values
- Fix the way we looked up internals of react for latest version
- Fix matcher messages from always sounding positive, even when negated
-
Changed project structure!
-
We are now using lerna to maintain 3 npm packages:
enzyme-matchers
(simple functions to handle assertions)jasmine-enzyme
(implementation of enzyme-matchers in jasmine)jest-enzyme
(_implementation of enzyme-matchers in jest)
-
This is only breaking if you use Jest.
- If you do, simply change to use the
jest-enzyme
package and everything should work.
- If you do, simply change to use the
- Fixed negated matchers output message to sound negated.
- Add
toHaveText
matcher
- Include
repository
in package.json
- Rename
toContain
totoContainReact
to prevent core matcher overwrite - Rename
toMatch
totoMatchSelector
to prevent core matcher overwrite
- Remove
jasmine
from thepeerDependencies
list- Jasmine is implicity with the library
- the peerDep caused issues with npm2 and jest
0.2.1 was a failed release
- Fix flowtype issues
- Add
toHaveStyle
matcher
- Initial Implementation