These packages will be bundled in production unless meteor npm prune --production is used to remove the devDependancies!
Added scripts
Run with meteor npm [script]
Unit testing:
test: Runs one test (without loading the client), eager-loading any *.test.js files present in the directory (files under a ./test/ directory are ignored )
test-watch: Build & run test server, hot reloading on file changes. Server tests will happen in the command line, and the same tests are available on the client by opening localhost:3000. Very useful for unit testing during development!
Integration testing (client):
test-app: Build & run the full stack, including client, then run tests once. Loads any *.app-test.js files present outside of ./test/ (does not load *.test.js files).
test-app-watch: Build & run full stack, including client. Hot reload on file changes, just like meteor run. Also inserts a <div> with test results at the top of the page.
Note that for test-watch, Iron Router appends a routing error to the end of the page. This is because the client isn't being delivered as IR expects it to be. It doesn't interfere with the function of the script, it's just an eyesore. I haven't adressed it, because I figured it would change with #158.
Also note that you cannot meteor mongo while a test instance is running because a test instance uses a test database on port :3001. If you have a local mongo client, you can connect with mongo meteor --port 3001.
At present, I haven't written any Integration tests due to difficulty with the current publications. I'm having trouble figuring out the best method to subscribe to a publication that includes all attorneys in the client, given how the current publications are structured. I wanted to get this PR out before moving on to inegration tests.
Added Packages
Atmosphere:
*These packages don't load in production
NPM devDependencies:
assert
library for testsThese packages will be bundled in production unless
meteor npm prune --production
is used to remove the devDependancies!Added scripts
Run with
meteor npm [script]
Unit testing:
test
: Runs one test (without loading the client), eager-loading any*.test.js
files present in the directory (files under a./test/
directory are ignored )test-watch
: Build & run test server, hot reloading on file changes. Server tests will happen in the command line, and the same tests are available on the client by opening localhost:3000. Very useful for unit testing during development!Integration testing (client):
test-app
: Build & run the full stack, including client, then run tests once. Loads any*.app-test.js
files present outside of./test/
(does not load*.test.js
files).test-app-watch
: Build & run full stack, including client. Hot reload on file changes, just likemeteor run
. Also inserts a<div>
with test results at the top of the page.Note that for
test-watch
, Iron Router appends a routing error to the end of the page. This is because the client isn't being delivered as IR expects it to be. It doesn't interfere with the function of the script, it's just an eyesore. I haven't adressed it, because I figured it would change with #158.Also note that you cannot
meteor mongo
while a test instance is running because a test instance uses a test database on port :3001. If you have a local mongo client, you can connect withmongo meteor --port 3001
.At present, I haven't written any Integration tests due to difficulty with the current publications. I'm having trouble figuring out the best method to subscribe to a publication that includes all attorneys in the client, given how the current publications are structured. I wanted to get this PR out before moving on to inegration tests.