0.0.4 • Published 8 years ago

@joegesualdo/ava-react v0.0.4

Weekly downloads
2
License
-
Repository
github
Last release
8 years ago

ava-react Build Status

Test react components with ava, no setup required.

Install

$ npm install --global @joegesualdo/ava-react

Usage

$ ava-react <test-file>

Setup

1) 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
          }
        ]
      ]
    }
  }
}

2) You must have this in your package.json file:

{
  ...
  "ava": {
    "require": [
      "babel-register"
    ],
    "babel": "inherit"
  }
  ...
}

Test

$ npm test

Build

$ npm run build

Related

License

MIT © undefined