https://github.com/konojunya/react-testing-with-ava
Testing React Component with ava
https://github.com/konojunya/react-testing-with-ava
Last synced: 17 days ago
JSON representation
Testing React Component with ava
- Host: GitHub
- URL: https://github.com/konojunya/react-testing-with-ava
- Owner: konojunya
- License: mit
- Created: 2017-07-13T14:41:20.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-09T05:36:26.000Z (over 7 years ago)
- Last Synced: 2025-04-06T04:13:05.500Z (20 days ago)
- Language: JavaScript
- Homepage: https://github.com/avajs/ava
- Size: 124 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# React Testing with ava

React component test code
# use
```
$ npm install
$ npm test
```## develop
```
$ npm start
```# screen shot

# component
`src/component/App.jsx`
```
import React from "react"export default class App extends React.Component {
render() {
return(
hello world
)
}}
```# test pattern
- can use ava
- rendered h1 element
- render hello world
- has a .title class name---
- まずavaが使える状態であるか
- h1要素でレンダリングされているか
- hello worldという文字がレンダリングされているか
- titleというクラス名がついているか# reference
- [avajs/ava README](https://github.com/avajs/ava)
- [avajs/ava Testing React components](https://github.com/avajs/ava/blob/master/docs/recipes/react.md)
- [JavaScriptのテストフレームワークはAVAが流行り気味らしいので調べてみた](http://qiita.com/niisan-tokyo/items/000db7cd0e995c802334)
- [airbnb/enzyme](https://github.com/airbnb/enzyme)