There are many features that need some prototyping in the backend but the code quality has degraded over time as we made many changes. Furthermore, there are also many subtle bugs and performance issues due to us not using transactions. This PR does not fix all issues but it will resolve bugs where files refer to deleted locations and/or tags. Plus testing should be easier as mocking was replaced with just passing dependencies to the constructors and indexeddb is replaced with an in-memory implementation for tests. For future tests, jest.mock should be avoided as it is a sign of poor API design on our side.
There are many features that need some prototyping in the backend but the code quality has degraded over time as we made many changes. Furthermore, there are also many subtle bugs and performance issues due to us not using transactions. This PR does not fix all issues but it will resolve bugs where files refer to deleted locations and/or tags. Plus testing should be easier as mocking was replaced with just passing dependencies to the constructors and indexeddb is replaced with an in-memory implementation for tests. For future tests,
jest.mock
should be avoided as it is a sign of poor API design on our side.