expect-enzyme
uses this changelog style and follows semver.
- Support for Enzyme 3 and React 16.
.toHaveRendered()
without args was passing even if the element rendered non-null values.
- Ability to call
.toHaveRendered()
/.toNotHaveRendered()
without arguments.
- Use deep equality (not strict equality) when checking
.to(Not)HaveProp
values.
- Undefined
className
props could break the.to(Not)HaveClass
assertions.
- New mocha diffs where they made sense.
- Breaking change:
expect-enzyme
no longer exports an object. Now it's a function which returns the enzyme assertions. More details in issue #9. react
,react-dom
,expect
andenzyme
are peer dependencies now. This may break your tests if those dependencies aren't listed in yourpackage.json
.
- New
.toHaveRendered()
assertion. - New
.toNotHaveRendered()
assertion.
- New
.toNotHaveClass(name)
assertion. - New
.toNotHaveProp(name, value)
assertion. - New
.toNotHaveProps(props)
assertion. - New
.toNotHaveStyle(styles)
assertion. - New
.toNotHaveState(state)
assertion. - New
.toNotHaveContext(context)
assertion.
- Call to unsupported method
.exists()
on old enzyme versions.
- Support for mounted enzyme wrappers (
enzyme.mount
).
- Wraps custom assertions like
expect
built-ins rather than obliterating them.
- If you're using
require
, you no longer need to import.default
fromexpect-enzyme
.
.toHaveContext({...})
assertion.
.toHaveStyle()
now accepts an object of styles, replacing.toHaveStyles({...})
.
.toHaveStyles({...})
assertion.
- New
.toHaveStyles({...})
assertion.
- New
.toHaveStyle(property, [value])
assertion.
- Support for
.toNotExist()
assertion.
- New
.toContain(selector)
assertion. - New
.toNotContain(selector)
assertion.
- New
.toHaveState({...state})
assertion.
- New
.toHaveClass(className)
assertion.
- Support for
.toNotBeA(type)
assertion. - Support for
.toNotBeAn(type)
assertion.
- Support for
.toExist()
assertion.
- Shiny new readme.
- Support for
.toBeAn(type)
assertion. Slightly changes error messages for grammatical accuracy.
- Support for
.toBeA(type)
assertion.
- npm distribution hadn't included compiled source.
Initial release