An open API service indexing awesome lists of open source software.

https://github.com/sourceallies/react-tdd-example


https://github.com/sourceallies/react-tdd-example

Last synced: 11 months ago
JSON representation

Awesome Lists containing this project

README

          

A [TDD](https://twitter.com/hashtag/tdd) example using [React](http://facebook.github.io/react/), [Karma](http://karma-runner.github.io/0.13/index.html), [PhantomJS](http://phantomjs.org/), [Jasmine](http://jasmine.github.io/), and [Sinon](http://sinonjs.org/).

Setup instructions:

git clone git@github.com:sourceallies/react-tdd-example.git
cd react-tdd-example
npm install

To build the bundle:

npm run build

To run tests:

npm test

Each "feature" is added in two separate commits. The first commit, prefixed with "Failing", adds the failing test for the feature. The second commit, prefixed with "Passing", implements the feature, causing the previously failing test to pass.

To easily step through commits, use a script like this:

#!/bin/bash
git checkout master
git checkout $1

And specify the commit hash like so:

./checkout.sh HASH

The list of commit hashes can be found [here](https://github.com/sourceallies/react-tdd-example/commits/master)