that caused numerous issues in other parts of the programme • Not knowing that your code broke stuff • Fear of changing code • Fear of removing obsolete/unused code • Realising you have designed a bad API/interface for others to consume • Realising you have a pile of hard to read spaghetti code
Easy to work with, jQuery like traversal • Easy to integrate with test runners, assertion libraries and build process (Karma, Mocha, Chai, Browserify, Webpack, etc.) • Popularity, good maintainance & support, good docs, community, backed by AirBnB
• It does not render children components (renders “one level deep”) • It does not require a DOM (no mounting, no lifecycle components, etc.) • Fast • Use it for making markup related asserts
• Requires a DOM API to be present (use jsdom for that) • Slow • Ideal for use cases when you have components that interact with the DOM API, use lifecycle hooks (eg: componentDidMount), etc.
• Set this as a mindset • Mix static with full rendering (they serve different purposes) • Enzyme is very friendly (very nice API, well documented) • You will have to pair it with other technologies: either go for a granular stack (Mocha + Chai + Sinon) or opt for something like Jasmine (comprehensive, lots of functionality under one roof)