All Projects → kentcdodds → react-mocha-workshop

kentcdodds / react-mocha-workshop

Licence: MIT license
🐯 A workshop repository for testing React ⚛ with Mocha ☕ --> slides

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to react-mocha-workshop

Bookshelf
Build a ReactJS App workshop
Stars: ✭ 2,179 (+10795%)
Mutual labels:  kcd-edu
Learn React
Learn React with a laser focused, guided approach.
Stars: ✭ 204 (+920%)
Mutual labels:  kcd-edu
react-workshop
Exercises as part of a React workshop
Stars: ✭ 112 (+460%)
Mutual labels:  kcd-edu
Js Mocking Fundamentals
JavaScript Mocking Fundamentals on TestingJavaScript.com
Stars: ✭ 182 (+810%)
Mutual labels:  kcd-edu
React Jest Workshop
Stars: ✭ 193 (+865%)
Mutual labels:  kcd-edu
Express App Example
How I structure Express Apps (example repo)
Stars: ✭ 222 (+1010%)
Mutual labels:  kcd-edu
React Hooks And Suspense Egghead Playlist
This is the code for the egghead playlist "React Hooks and Suspense"
Stars: ✭ 128 (+540%)
Mutual labels:  kcd-edu
cra-macro-example
This is an example of how you can use Create React App with Babel Plugin Macros.
Stars: ✭ 38 (+90%)
Mutual labels:  kcd-edu
React Github Profile
Stars: ✭ 198 (+890%)
Mutual labels:  kcd-edu
react-hooks-pitfalls
The slides and code examples for my talk "React Hook Pitfalls"
Stars: ✭ 94 (+370%)
Mutual labels:  kcd-edu
The Beginner S Guide To Reactjs
The beginner's Guide to ReactJS course material for Egghead.io
Stars: ✭ 185 (+825%)
Mutual labels:  kcd-edu
React Ava Workshop
🐯 A workshop repository for testing React ⚛ with AVA 🚀 --> slides
Stars: ✭ 192 (+860%)
Mutual labels:  kcd-edu
How Jest Mocking Works
Stars: ✭ 231 (+1055%)
Mutual labels:  kcd-edu
Dom Testing Library With Anything
Use DOM Testing Library to test any JS framework on TestingJavaScript.com
Stars: ✭ 177 (+785%)
Mutual labels:  kcd-edu
babel-config-example
No description or website provided.
Stars: ✭ 16 (-20%)
Mutual labels:  kcd-edu
Static Testing Tools
Static Analysis Testing JavaScript Applications on TestingJavaScript.com
Stars: ✭ 141 (+605%)
Mutual labels:  kcd-edu
Modern React
workshop about React's hottest new features in 16.7.0
Stars: ✭ 210 (+950%)
Mutual labels:  kcd-edu
codegen-vs-preval-vs-macros
A comparison of the babel plugins codegen, preval, and macros
Stars: ✭ 16 (-20%)
Mutual labels:  kcd-edu
ng-jwt-workshop
A repo to demonstrate JWT implemented with NodeJS and AngularJS. Must download locally to use fully...
Stars: ✭ 16 (-20%)
Mutual labels:  kcd-edu
Asts Workshop
Improved productivity 💯 with the practical 🤓 use of the power 💪 of Abstract Syntax Trees 🌳 to lint ⚠️ and transform 🔀 your code
Stars: ✭ 253 (+1165%)
Mutual labels:  kcd-edu

React + Mocha + Enzyme = ❤️

slides-badge PRs Welcome Donate

Find slides here

This is a workshop for learning how to test React with the Mocha testing framework and the Enzyme testing library. It also uses Chai for helpful assertions

Project Setup

This project assumes you have NodeJS v6 or greater installed. You should also have npm v3 or greater installed as well (this comes packaged with Node 6). You'll also need a recent version of git installed as well.

You may have come to this project from different varying sources. There are a different series of branches for each workshop/course I've done. To get started with the project, start with this:

  1. Sign up for a GitHub Account (if you don't already have one)
  2. Clone this repository
  3. In the directory you cloned the repository, run npm run setup

If you need help with these steps, you might check out this free Egghead.io course which can help you get things going.

If the npm run setup script finishes without errors (don't worry about warnings) then you're good to go. Otherwise, please file an issue.

Testing Instructions

There are two directories in this project that you should be interested in:

  • app: Where the unfinished tests are (where you should add your tests).
  • app-final: Where the finished tests are (where you can reference if you get stuck).

The tests in app are actually all scaffolded for you. So your goal is to go through and write all the tests. Do this:

  1. Run npm run watch:test which will start running the tests in watch mode, meaning that as you save your file, it will automatically re-run your tests so you can quickly see how you're doing.
  2. Choose a file in the app directory that ends in .test.js and implement the tests by changing it.skip( to it( one-by-one.

Good luck!

LICENSE

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].