jasmine_react
Turn a jasmine Suite into one suitable for testing React components.
WARNING!!! This requires jasmine.promiseSuite to be available from jasmine_rsvp.
Example:
;
Features
The following features will become available to your suite:
React Test Helpers
All the React test helpers are injected into the global context throughout
your tests, so you can conveniently use things like find()
and click()
.
Example:
;
See JasmineReact.DOMHelpers for more info on what's available.
Automatic component (un)mounting
In your global suite context, "subject" will contain a reference to the mounted instance of the component you're testing, created and mounted during each test in your suite.
Action testing
To test if your component is sending actions correctly, a custom matcher is exposed to your suite, called #toSendAction.
See the corresponding docs for more info on the matcher.
Example:
;
License
MIT