apstanisic / zmaj

Zmaj is a headless CMS for managing database
https://zmaj.vercel.app
MIT License
5 stars 0 forks source link

Jest reports memory leak #10

Open apstanisic opened 1 year ago

apstanisic commented 1 year ago

They are memory leaks (maybe supertest problem), and clash with changing db (there are locking mechanism, but it still happens). It also affects non db schema related tests (authz, files...). It works fine when running only one group.

Sometimes it also happens in unit tests. They are difficult to debug since it never happens when running only single test suite, and it happens only simetimes

apstanisic commented 1 year ago

Switched to vite, check if there is leak there. There is logHeapUsage, check that out

apstanisic commented 1 year ago

There is memory leak in vitest. it starts with 100mb heap and ends with 493mb heap. IDK if it's because of supertest, or memory leak in app. There is this bug