EN

Enzyme Shallow Equal

enzyme-shallow-equal

Adaptation of react-addons-shallow-compare, for independent usage

Testing
javascript
shallow rendering
shallowRender
test
reactjs
react
flux
testing
test utils
assertion helpers
Stars
20k
Weekly
805k
Open issues
282
Bundle
~25 kB

Installation

npm install enzyme-shallow-equal

Code example

import { EnzymeShallowEqual } from "enzyme-shallow-equal";

export function Example() {
  return (
    <div>
      <h2>Enzyme Shallow Equal</h2>
      <EnzymeShallowEqual />
    </div>
  );
}

Pros & cons

Pros

  • Actively maintained by Jordan Harband
  • 805k weekly downloads. Battle tested
  • MIT licensed

Considerations

  • Adds roughly ~25 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 282 open issues on GitHub

FAQs

Alternatives & similar libraries