Mocha tests#165
Closed
jSadoski wants to merge 14 commits intobillimarie:masterfrom
jSadoski:mocha-tests
Closed
Conversation
Contributor
Author
|
Quick note on 35612ae (denodeify utility): It's very useful for some of the integration tests I'm trying to implement. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added Packages
Atmosphere:
*These packages don't load in production
NPM devDependencies:
assertlibrary for testsThese packages will be bundled in production unless
meteor npm prune --productionis 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.jsfiles 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.jsfiles present outside of./test/(does not load*.test.jsfiles).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 mongowhile 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.