Unit tests are for selectors and reducers --- most of the functions there are pure and simple to test. Just run:
and mocha will run all files named
Component tests are for components that go into both apps. To run the test suite:
npm run karma
The karma runner will run all files named
*.spec.js, compile them using webpack and launch the Chrome window. Each test has automatic cleanup but if you want to see the component visually in the browser, just comment out the
Run both suites after making a change! because changes impact both apps.
To pull from and push to development:
git pull dev mastergit push dev master
To pull from and push to production:
git pull production mastergit push production master
Code should always be pushed to dev first, and then production because people will fork and pull from production.
Two separate repos are maintained (look at
.git/config file) to power the development and production versions. In the Heroku CLI, you set environment variables to the dev and production versions separately, e.g. only the production version will have the environment variable
PROD_QBANK_HOST. This way, when the middleman code is running, it knows whether it's in dev or prod.
To inspect the environment variables in each app, do:
heroku config --remote [dev or production]