jabyess / mailroad

React + slate + MJML + express to make drafting complex emails easier.
5 stars 0 forks source link

test DB + DB bootstrap script #120

Open ammarm08 opened 7 years ago

ammarm08 commented 7 years ago

Access to emails isn't filtered by user, so we can't just create a TEST_USER, run tests on him, then wipe his data clean before/after.

Will need to add a test db instead.

On a related noted, we need a script that:

jabyess commented 7 years ago

I think we shouldn't be testing against a real database. Jest has a mock data feature that might be super useful.

https://facebook.github.io/jest/docs/manual-mocks.html#content

ammarm08 commented 7 years ago

front end, for sure, i'll def use those mocks that jest comes with

on the backend we should definitely use a db in testing -- otherwise, we won't know if our code actually completes successful couchdb transactions