Convert typescript integration tests to unit tests
TLDR; We can't upgrade our npm libraries because of a conflict between @types/mocha
and @types/jest
!182 (merged). We decide to move back towards having integration tests (mocha
) written in JS.
When we introduced both jest
and mocha
testing frameworks, we encountered issues with conflicting types for global functions like describe
and it
.
These types are not conflicting with the current version numbers and so we thought we could start using TS for integration tests as well. But when we attempted !182 (merged) , we realised that the types are still prone to conflicting.
Hence we decided to keep the rule "JS for integration tests, TS for unit tests".
The MR is structured into commits that are first preparing the ground for migrating the tests and then migrating one by one.
We decided to keep gitlab_remote_source_provider.test.js
as an integration test because it benefits from using the mocked GitLab API.
/cc @haasef