Skip to content

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

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

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

Edited by Inactive Account

Merge request reports