couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject [couchdb-fauxton] branch master updated: Update project setup and test instructions (#939)
Date Wed, 26 Jul 2017 11:45:20 GMT
This is an automated email from the ASF dual-hosted git repository.

garren pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-fauxton.git


The following commit(s) were added to refs/heads/master by this push:
     new b28488a  Update project setup and test instructions (#939)
b28488a is described below

commit b28488aa6d25d2f9dee1088d0b4c15f1fc22319c
Author: Antonio-Maranhao <30349380+Antonio-Maranhao@users.noreply.github.com>
AuthorDate: Wed Jul 26 07:45:18 2017 -0400

    Update project setup and test instructions (#939)
    
    * Update setup instructions
    
    * Update test instructions
---
 readme.md | 23 +++++++++++++++--------
 tests.md  | 33 ++++++++++++++++++++++++++-------
 2 files changed, 41 insertions(+), 15 deletions(-)

diff --git a/readme.md b/readme.md
index b38cdce..95ca37e 100644
--- a/readme.md
+++ b/readme.md
@@ -17,13 +17,21 @@ See `fauxton --help` for extra options.
 
 ## Setting up Fauxton
 
-Please note that [node.js](http://nodejs.org/) and npm is required. Speciifcally, Fauxton
requires at least Node 6 and npm 3.
-
-1. make sure you have CouchDB installed. Instructions on how to install it can be  
+Please note that [node.js](http://nodejs.org/) and npm is required. Specifically, Fauxton
requires at least Node 6 and npm 3.
+
+1. Fork this repo (see [GitHub help](https://help.github.com/articles/fork-a-repo/) for details)
+1. Clone your fork: `git clone https://github.com/YOUR-USERNAME/couchdb-fauxton.git`
+1. Go to your cloned copy: `cd couchdb-fauxton`
+1. Set up the upstream repo: 
+    * `git remote add upstream git@github.com:apache/couchdb-fauxton.git`
+    * `git fetch upstream`
+    * `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 2: Follow instructions 
 [found here](http://couchdb.readthedocs.org/en/latest/install/index.html)
-1. fork this repo: `git clone https://github.com/apache/couchdb-fauxton.git`
-1. add upstream to the private apache repo: `git remote add upstream http://git-wip-us.apache.org/repos/asf/couchdb-fauxton.git`
-1. go to your cloned copy of the repo (usually `couchdb-fauxton`) and type `npm install`
to download all dependencies
+
 
 ## Running Fauxton
 
@@ -39,8 +47,7 @@ type:
 npm run dev
 ```
 
-Wait until you see the "Fauxton" ascii art on your command line, then you should be able
to access Fauxton at
-`http://localhost:8000`
+You should be able to access Fauxton at `http://localhost:8000`
 
 
 ### Preparing a Fauxton Release
diff --git a/tests.md b/tests.md
index 201d3f2..762f1b5 100644
--- a/tests.md
+++ b/tests.md
@@ -1,27 +1,46 @@
 # Tests
 
-Fauxton has both test coverage through unit and selenium tests, built on
-[Mocha](https://mochajs.org/) and [Nightwatch](http://nightwatchjs.org/) respectively.
+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.
 
-## Unit Tests
+End-to-end tests use [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:
+**Command line**
 
     grunt test
 
-Browser: make sure the dev server is running, and enter the path (not URL) to your `runner.html`
file in your browser.
+**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
+    
+To run a single test:
+
+    npm run jest -- filename.test.js
 
-## Selenium tests
+## End-to-end tests
 
-To run selenium locally you need docker installed. Selenium runs in a docker container and
connects to a CouchDB instance in another container. To start them run the command:
+To run selenium locally you need Docker installed. Selenium runs in a Docker container and
connects to a CouchDB instance in another container. To start them run the command:
 
     npm run docker:up
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@couchdb.apache.org" <commits@couchdb.apache.org>'].

Mime
View raw message