ava-react
Test react components with ava, no setup required.
Install
$ npm install --global @joegesualdo/ava-react
Usage
$ ava-react <test-file>
Setup
- You must have this
.babelrc
at the root of you project:
{
"presets": [
"react",
"es2015",
'stage-0',
],
"env": {
"AVA": {
"plugins": [
[
"babel-plugin-webpack-loaders",
{
"config": "${CONFIG}",
"verbose": true
}
]
]
}
}
}
- You must have this in your
package.json
file:
{
...
"ava": {
"require": [
"babel-register"
],
"babel": "inherit"
}
...
}
Test
$ npm test
Build
$ npm run build
Related
- example-package - Add description of the example package here.
License
MIT © undefined