Skip to content

Conversation

@ionous
Copy link
Contributor

@ionous ionous commented Dec 16, 2025

Removes dependencies on chai, chai-http, and mocha in favor of the node test runner.
Allows the unit tests to run against a standalone mysql container using:
npm run test -db=mysql

To handle the mysql tests, the unit tests have to more correctly create and destroy tables during tests; so there are some changes for calls which setup and clean up the db tables

still marked as a draft because need to test the local site under docker to double check nothing broke ( ex. re the db startup calls )

fixes an issue with non-deterministic fake data generated during test ( due to db race conditions )

simplifies testing dependencies:
- replaces chai and mocha frameworks with node's own test-runner
- replaces chai-http with supertest ( supertest is superagent's own http test helper; superagent is what chai-http used under the hood )
- removes lorem in favor of faker.lorem

splits part of app.js into "appSetup.js" so that supertest can start the http listener server
it can't reliably handle line ending changes; and git reset --hard, and git stash are useless in these cases.
these files aren't really needed. so just delete them.
yay! source control. ~!*&@~!(&~((#&~(!&~!(@&(*!&(*
and remove excess afterCreate logging
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants