Skip to content

Use restore() instead of reset() for removing axios MockAdapter

Inactive Account requested to merge winh-axios-mock-restore-ee into master

EE port of https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16647

What does this MR do?

When using the axios MockAdapter, we need to call mock.restore() instead of mock.reset().

Why was this MR needed?

mock.reset() does not restore the original adapter which leads to subsequent tests still using the mock.

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/39727

Merge request reports