Updated instructions (#997)
diff --git a/code-layout.md b/code-layout.md
index 7bb038a..3b974ea 100644
--- a/code-layout.md
+++ b/code-layout.md
@@ -10,7 +10,7 @@
(unit-tested!) React components. Backbone models and collections are still being used for server-side data retrieval
and storage as is URL routing, but the plan is to phase out all Backbone over time.
-### React and Flux
+### React and the Flux pattern
You can read more about [React](https://facebook.github.io/react/) and [Flux](https://facebook.github.io/flux/docs/overview.html)
on their sites, but a few quick words about both.
@@ -21,8 +21,9 @@
ease of testing. Check out [this page](https://facebook.github.io/react/docs/why-react.html) for a few more remarks.
Flux is primarily a *pattern* for keeping your code organized over time. One of its key ideas is to have *one-way
-communication* as shown in the [diagram here](https://github.com/facebook/flux). Information flows
-like this:
+communication* as shown in the [diagram here](https://github.com/facebook/flux).
+
+Note that Fauxton has no dependency with the Flux code as it implements its own dispatcher and reduce stores. The information flows like this:
1. User clicks on something in a React component,
2. the component fires an action (in an `actions.js` file),
@@ -39,10 +40,16 @@
needed to know about it to make use of the new space. Maybe one was a graph and needed to redraw for the extra space,
and maybe another component could switch from "basic" to "advanced" view or something.
-With Flux, you can just publish the single event, then each store could listen for it, change whatever data was needed
+With this pattern, you can just publish the single event, then each store could listen for it, change whatever data was needed
internally, then notify any components that was listening: and they would then have the choice to rerender or not,
based on what changed. This is basic "pub/sub": allowing you to keep code loosely coupled, but still communicate.
+### Moving to Redux
+
+There are a few drawbacks in the implementation above though. For instance the reduce stores rely on Backbone.
+
+For this reason and others, it's encouraged that new components use Redux (https://github.com/reactjs/redux), which follows the same principles as Flux. Additionally, use React Redux (https://github.com/reactjs/react-redux) to easily connect a Redux store to your React components.
+
## Addons
Each bit of functionality is its own separate module or addon. Addons are located in their own `app/addons/myaddon-name`
diff --git a/readme.md b/readme.md
index 95ca37e..545a4ca 100644
--- a/readme.md
+++ b/readme.md
@@ -28,7 +28,8 @@
* `git branch --set-upstream-to=upstream/master master`
1. Download all dependencies: `npm install`
1. Make sure you have CouchDB installed.
- - Option 1 (**recommended**): Use `npm run docker:up` to start a Docker container running CouchDB. You need to have [Docker](https://docs.docker.com/engine/installation/) installed to use this option.
+ - Option 1 (**recommended**): Use `npm run docker:up` to start a Docker container running CouchDB with user `tester` and password `testerpass`.
+ - You need to have [Docker](https://docs.docker.com/engine/installation/) installed to use this option.
- Option 2: Follow instructions
[found here](http://couchdb.readthedocs.org/en/latest/install/index.html)
diff --git a/tests.md b/tests.md
index 762f1b5..e9033f0 100644
--- a/tests.md
+++ b/tests.md
@@ -1,42 +1,22 @@
# Tests
-Fauxton has both unit and end-to-end tests.
-
-Most unit tests are implemented with [Mocha](https://mochajs.org/) but we are slowly transitioning to [Jest](https://facebook.github.io/jest/). New tests should be implemented with Jest.
-
-End-to-end tests use [Nightwatch](http://nightwatchjs.org/) against Selenium.
+Fauxton has both **unit tests**, implemented with [Jest](https://facebook.github.io/jest/), and **end-to-end tests** using [Nightwatch](http://nightwatchjs.org/) against Selenium.
## Unit tests
-Use `npm run test` to execute both Mocha and Jest tests.
-
-### Mocha tests
-
-You can run the Mocha unit tests via the command line or your browser.
-
-**Command line**
-
- grunt test
-
-**Browser**
-
-Run `grunt test` at least once in order to generate `bundle.js` which is required by the HTML page.
-
-Make sure the dev server is running, and enter the path (not URL) to your `runner.html` file in your browser.
-
- file://path/to/couchdb-fauxton/test/runner.html
-
-Refreshing the URL will re-run the tests via PhantomJS and in the browser.
-
-### Jest tests
-
To run all tests:
- npm run jest
+ npm run test
-To run a single test:
+You can run only specific tests by providing a pattern or filename.
- npm run jest -- filename.test.js
+E.g.: to run tests in the `filename.test.js` file:
+
+ npm run test -- filename.test.js
+
+E.g.: to run tests under the `addons/cors` path:
+
+ npm run test -- addons/cors
## End-to-end tests
@@ -77,7 +57,7 @@
```javascript
// ...
-"nightwatch": {
+"nightwatch": {
// ...
"testBlacklist": {
"documents": ["*"],