- Fix confusing messaging when Cavy fails to connect to cavy-cli.
- Deprecate the
sendReport
prop. By default Cavy checks to see whether cavy-cli is running and sends the test report if a response is received. - Add the ability to use a custom
reporter
when running Cavy tests. If supplied, Cavy will send the test report to the custom reporter rather than cavy-cli.
- Add a
beforeEach
function that can be used on a per-spec basis. Thanks to PatrickBRT whose work inspired our approach! - BREAKING Clear AsyncStorage and re-render the app before each test runs.
- Cavy no longer resets your app at the end of the test suite.
- Un-deprecate
wrap
(was deprecated in 0.6.0) and rewrite it using React Hooks.wrap
is now the accepted way to test function components, replacing our previous recommendation to use Recompose'stoClass
(which has been deprecated in favour of React Hooks). 🎉
- BREAKING Drop official support for React Native < 0.59 and React < 16.8.0.
- Update
<Tester>
to use the newer Context API introduced in React 16.3. - Added a custom React Hook called
useCavy()
which can be used to accessgenerateTestHook
from your functional components.
This version brings Cavy in line with how people use React nowadays (moving towards using functional components). However React Hooks were added in React Native 0.59 and React 16.8.0, so you will need to upgrade your application to continue to use Cavy from version 1.0.0 onwards. You can continue to use 0.6.2 in the meantime.
If you don't use useCavy()
Cavy 1.0.0 should work with React Native >= 0.57.5
which was the earliest version that supported the new Context API
however this is not officially supported.
- Fix for when
clearAsyncStorage
option is used but there are no entries in AsyncStorage. Thanks haikyuu!
- Update
babel-presets-env
and.babelrc
. Thanks eriben.
- Remove
console.warn
when overwriting a component. - Add deprecation message when calling
wrap
.
- Support cavy-cli.
cavy-cli is the next step in Cavy's development. With it, we can start to support Continuous Integration, conditionally running tests, and a bunch of other cool stuff. Thanks to Tyler Pate whose suggestions inspired our approach.
- Stop using deprecated
PropTypes
andcreateClass
. Thanks Mohammed Abu-alsaad! - Fix for when using a wrapped component in a shallow render environment. Thanks Kye Bracey!
- Updated documentation for Create React Native App / Expo.
- Add optional
startDelay
property to<Tester>
which delays the test suite from beginning once the component is mounted. - Added a start and end console log line.
With thanks to Tyler Pate for both of these features!
- Tweak to the test failure message.
- Added the ability to automatically clear the app's entire AsyncStorage between test cases. By default, behaviour is unchanged (it does not clear it).
- Added a
notExists
component assertion.
- Added a pause function.
- Configurable wait time when finding components.
- Bug fix to ensure that default props are set for wrapped components.
- Initial release.