Have a local instance of postges running, then do the following:
$ cd db
$ createdb ccbc
$ sqitch deploy
This project uses node-convict
to declare environment variables. Variables for each environment are declared in development.json
, test.json
or production.json
.
The defaults can be overridden directly or in an .env file.
Run the following commands:
$ cd app
$ yarn
$ yarn dev
sudo cpan TAP::Parser::SourceHandler::pgTAP
$ git clone https://github.com/theory/pgtap.git
$ cd pgtap
$ git checkout v1.2.0
$ git branch
$ make
$ sudo make install
$ psql -c 'CREATE EXTENSION pgtap;'
In the project root run:
pg_prove --username postgres --dbname ccbc db/test/*/*_test.sql
In /app
directory run yarn test
Cypress and Happo is used for end to end testing. A Happo account and API secret + key is required for Happo testing though it is automatically disabled if no keys exist. Happo is free for open source projects.
To run the end to end tests we need to run our development server in one terminal with the command:
yarn dev
Once that is running in a second terminal run:
yarn test:e2e