https://github.com/sourceallies/react-tdd-example
https://github.com/sourceallies/react-tdd-example
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sourceallies/react-tdd-example
- Owner: sourceallies
- Created: 2015-08-21T17:52:20.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-09-14T16:58:51.000Z (almost 11 years ago)
- Last Synced: 2024-04-14T22:23:13.361Z (about 2 years ago)
- Language: JavaScript
- Size: 181 KB
- Stars: 1
- Watchers: 9
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)