cognovi-ai / the-cdj

The Cognitive Distortion Journal (CDJ) is a smart journaling tool that helps remedy distorted thinking. It can feel impossible to follow the CBT technique of labeling distorted thinking and finding alternative modes of thought (i.e. reframing) while cognitive distortions are occurring. The CDJ does that work for you. -- The CDJ is in beta testing!!
https://thecdj.app
3 stars 0 forks source link

139 Utils Migration #158

Closed davidzlu closed 2 weeks ago

davidzlu commented 4 weeks ago

Utils directory migration to Typescript plus unit tests. Also includes changes to jest setup and teardown scripts, and seed.js.

Migrating ExpressError to TS breaks imports for jest setup and teardown scripts. They seem to run before the transformer runs. This issue will affect any module that seed.js imports that would be converted to TS, i.e. the entire models directory. This PR avoids importing seed.js in the globalsetup and globalteardown scripts to manage a memory mongodb instance. Seeding the test db happens before every test suite that uses the db.