[*] Add cloud specs to node scripts

Summary:
Implements `test-cloud` to cd into each cloud package and run `npm test`.
It's easier this way because of the relative paths in the Jasmine configs,
and this also ensures that the tests can always be run within their
individual packages too.

Also calls `test-cloud` from `test` so people don't forget about it. If
someone wants to test just the client, they can explicitly do so with
the `test-client` script.

Depends on D4058, D4059, D4061, and D4062

Test Plan: Ran the tests

Reviewers: evan, mark, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D4031
This commit is contained in:
Halla Moore 2017-02-28 15:49:52 -08:00
parent 097a96274f
commit 2db42db5df

View file

@ -40,7 +40,7 @@
},
"scripts": {
"start": "npm run start-client",
"test": "npm run test-client",
"test": "npm run test-client && npm run test-cloud",
"start-client": "packages/client-app/node_modules/.bin/electron packages/client-app --enable-logging --dev",
"test-client": "packages/client-app/node_modules/.bin/electron packages/client-app --enable-logging --test",
"test-client-window": "packages/client-app/node_modules/.bin/electron packages/client-app --enable-logging --test=window",
@ -48,7 +48,7 @@
"build-client": "grunt ci --gruntfile=packages/client-app/build/Gruntfile.js --base=./",
"start-cloud": "pm2 stop all; pm2 delete all; pm2 start packages/cloud-core/pm2-dev.yml --no-daemon",
"start-cloud-debug": "pm2 stop all; pm2 delete all; pm2 start packages/cloud-core/pm2-debug-cloud-api.yml --no-daemon",
"test-cloud": "",
"test-cloud": "cd packages/cloud-api && npm test && cd ../cloud-core && npm test && cd ../cloud-workers && npm test && cd ../isomorphic-core && npm test",
"stop": "npm run stop-cloud",
"stop-cloud": "pm2 stop all; pm2 delete all;",
"build-cloud": "docker build .",