billimarie / prosecutor-database

An open-source, community oversight dataset of all U.S. Prosecutors. Happy Hacktoberfest 🎃
https://billimarie.github.io/prosecutor-database
Other
87 stars 85 forks source link

Mocha tests #165

Closed jSadoski closed 1 year ago

jSadoski commented 4 years ago

Added Packages

Atmosphere:

*These packages don't load in production

NPM devDependencies:

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:

Integration testing (client):

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.

jSadoski commented 4 years ago

Quick note on 35612ae (denodeify utility): It's very useful for some of the integration tests I'm trying to implement.