Our testing workflow shows very inconsistent behavior when run both locally and in the pr pipeline.
Describe the solution
A lot of the dependencies we're using were outdated, e.g. mongoose, mongo-memory-server and jest, so I upgraded all of them and fixed the conflicts.
Importantly, that meant getting rid of the outdated esm package we were using to allow us to use es modules within node, which is now supported natively in the node version we are using. I also had to slightly change the babel config that's used for testing because jest's es modules support is still experimental.
Fixing all of this exposed some issues with our tests that weren't being caught before, so I made some minor changes to the some of the api routes and also the tests themselves to make sure everything passed.
Risk
Since alot was changed in terms of dependencies, there might be some difficulty with replicating on everyone's machines.
Definition of Done
[ ] Code peer-reviewed
[ ] Wiki Documentation is written and up to date
[ ] Unit tests written and passing
[ ] Integration tests written and passing
[ ] Continuous Integration build passing
[ ] Acceptance criteria met
[ ] Deployed to production environment
Reviewed By
Who reviewed your PR - for commit history once merged
Describe the issue
Our testing workflow shows very inconsistent behavior when run both locally and in the pr pipeline.
Describe the solution
A lot of the dependencies we're using were outdated, e.g. mongoose, mongo-memory-server and jest, so I upgraded all of them and fixed the conflicts.
Importantly, that meant getting rid of the outdated
esm
package we were using to allow us to use es modules within node, which is now supported natively in the node version we are using. I also had to slightly change the babel config that's used for testing because jest's es modules support is still experimental.Fixing all of this exposed some issues with our tests that weren't being caught before, so I made some minor changes to the some of the api routes and also the tests themselves to make sure everything passed.
Risk
Since alot was changed in terms of dependencies, there might be some difficulty with replicating on everyone's machines.
Definition of Done
Reviewed By
Who reviewed your PR - for commit history once merged