Automagically generate tests from errors.
Follow the flow:
- Enhance your components with
fixIt
- Write some bugs (or wait for your components to fail)
- Open the console and copy the test snippet
- Paste the code to reproduce the error
- Fix the bugs and celebrate
yarn add --dev react-fix-it
import React, { Component } from 'react'
import fixIt from 'react-fix-it'
class MyComponent extends Component {
render() {
return <div>Hello ⚛</div>
}
}
export default fixIt(MyComponent)
yarn test