Commit 62e04169 authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch 'winh-axios-mock-restore-ee' into 'master'

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

See merge request gitlab-org/gitlab-ee!4217
parents ae59c77f 605e6154
...@@ -63,7 +63,7 @@ We have also decided against using [axios interceptors] because they are not sui ...@@ -63,7 +63,7 @@ We have also decided against using [axios interceptors] because they are not sui
}); });
afterEach(() => { afterEach(() => {
mock.reset(); mock.restore();
}); });
``` ```
......
...@@ -45,7 +45,7 @@ describe('iPython notebook renderer', () => { ...@@ -45,7 +45,7 @@ describe('iPython notebook renderer', () => {
}); });
afterEach(() => { afterEach(() => {
mock.reset(); mock.restore();
}); });
it('does not show loading icon', () => { it('does not show loading icon', () => {
...@@ -96,7 +96,7 @@ describe('iPython notebook renderer', () => { ...@@ -96,7 +96,7 @@ describe('iPython notebook renderer', () => {
}); });
afterEach(() => { afterEach(() => {
mock.reset(); mock.restore();
}); });
it('does not show loading icon', () => { it('does not show loading icon', () => {
...@@ -127,7 +127,7 @@ describe('iPython notebook renderer', () => { ...@@ -127,7 +127,7 @@ describe('iPython notebook renderer', () => {
}); });
afterEach(() => { afterEach(() => {
mock.reset(); mock.restore();
}); });
it('does not show loading icon', () => { it('does not show loading icon', () => {
......
...@@ -55,7 +55,7 @@ describe('Board card', () => { ...@@ -55,7 +55,7 @@ describe('Board card', () => {
}); });
afterEach(() => { afterEach(() => {
mock.reset(); mock.restore();
}); });
it('returns false when detailIssue is empty', () => { it('returns false when detailIssue is empty', () => {
......
...@@ -60,7 +60,7 @@ describe('Board list component', () => { ...@@ -60,7 +60,7 @@ describe('Board list component', () => {
}); });
afterEach(() => { afterEach(() => {
mock.reset(); mock.restore();
}); });
it('renders component', () => { it('renders component', () => {
......
...@@ -58,7 +58,7 @@ describe('Issue boards new issue form', () => { ...@@ -58,7 +58,7 @@ describe('Issue boards new issue form', () => {
afterEach(() => { afterEach(() => {
vm.$destroy(); vm.$destroy();
mock.reset(); mock.restore();
}); });
it('calls submit if submit button is clicked', (done) => { it('calls submit if submit button is clicked', (done) => {
......
...@@ -34,7 +34,7 @@ describe('Store', () => { ...@@ -34,7 +34,7 @@ describe('Store', () => {
}); });
afterEach(() => { afterEach(() => {
mock.reset(); mock.restore();
}); });
it('starts with a blank state', () => { it('starts with a blank state', () => {
......
...@@ -30,7 +30,7 @@ describe('List model', () => { ...@@ -30,7 +30,7 @@ describe('List model', () => {
}); });
afterEach(() => { afterEach(() => {
mock.reset(); mock.restore();
}); });
it('gets issues when created', (done) => { it('gets issues when created', (done) => {
......
...@@ -78,7 +78,7 @@ describe('EpicShowApp', () => { ...@@ -78,7 +78,7 @@ describe('EpicShowApp', () => {
}); });
afterEach(() => { afterEach(() => {
mock.reset(); mock.restore();
}); });
it('should render epic-header', () => { it('should render epic-header', () => {
......
...@@ -59,7 +59,7 @@ describe('Issuable output', () => { ...@@ -59,7 +59,7 @@ describe('Issuable output', () => {
}); });
afterEach(() => { afterEach(() => {
mock.reset(); mock.restore();
realtimeRequestCount = 0; realtimeRequestCount = 0;
vm.poll.stop(); vm.poll.stop();
......
...@@ -38,7 +38,7 @@ describe('Dashboard', () => { ...@@ -38,7 +38,7 @@ describe('Dashboard', () => {
}); });
afterEach(() => { afterEach(() => {
mock.reset(); mock.restore();
}); });
it('shows up a loading state', (done) => { it('shows up a loading state', (done) => {
......
...@@ -64,7 +64,7 @@ describe('ee merge request widget options', () => { ...@@ -64,7 +64,7 @@ describe('ee merge request widget options', () => {
}); });
afterEach(() => { afterEach(() => {
mock.reset(); mock.restore();
}); });
it('should render provided data', (done) => { it('should render provided data', (done) => {
...@@ -87,7 +87,7 @@ describe('ee merge request widget options', () => { ...@@ -87,7 +87,7 @@ describe('ee merge request widget options', () => {
}); });
afterEach(() => { afterEach(() => {
mock.reset(); mock.restore();
}); });
it('should render provided data', (done) => { it('should render provided data', (done) => {
...@@ -110,7 +110,7 @@ describe('ee merge request widget options', () => { ...@@ -110,7 +110,7 @@ describe('ee merge request widget options', () => {
}); });
afterEach(() => { afterEach(() => {
mock.reset(); mock.restore();
}); });
it('should render error indicator', (done) => { it('should render error indicator', (done) => {
...@@ -158,7 +158,7 @@ describe('ee merge request widget options', () => { ...@@ -158,7 +158,7 @@ describe('ee merge request widget options', () => {
}); });
afterEach(() => { afterEach(() => {
mock.reset(); mock.restore();
}); });
it('should render provided data', (done) => { it('should render provided data', (done) => {
...@@ -209,7 +209,7 @@ describe('ee merge request widget options', () => { ...@@ -209,7 +209,7 @@ describe('ee merge request widget options', () => {
}); });
afterEach(() => { afterEach(() => {
mock.reset(); mock.restore();
}); });
it('should render provided data', (done) => { it('should render provided data', (done) => {
...@@ -233,7 +233,7 @@ describe('ee merge request widget options', () => { ...@@ -233,7 +233,7 @@ describe('ee merge request widget options', () => {
}); });
afterEach(() => { afterEach(() => {
mock.reset(); mock.restore();
}); });
it('should render error indicator', (done) => { it('should render error indicator', (done) => {
...@@ -279,7 +279,7 @@ describe('ee merge request widget options', () => { ...@@ -279,7 +279,7 @@ describe('ee merge request widget options', () => {
}); });
afterEach(() => { afterEach(() => {
mock.reset(); mock.restore();
}); });
it('should render provided data', (done) => { it('should render provided data', (done) => {
...@@ -331,7 +331,7 @@ describe('ee merge request widget options', () => { ...@@ -331,7 +331,7 @@ describe('ee merge request widget options', () => {
}); });
afterEach(() => { afterEach(() => {
mock.reset(); mock.restore();
}); });
it('should render provided data', (done) => { it('should render provided data', (done) => {
...@@ -355,7 +355,7 @@ describe('ee merge request widget options', () => { ...@@ -355,7 +355,7 @@ describe('ee merge request widget options', () => {
}); });
afterEach(() => { afterEach(() => {
mock.reset(); mock.restore();
}); });
it('should render error indicator', (done) => { it('should render error indicator', (done) => {
...@@ -401,7 +401,7 @@ describe('ee merge request widget options', () => { ...@@ -401,7 +401,7 @@ describe('ee merge request widget options', () => {
}); });
afterEach(() => { afterEach(() => {
mock.reset(); mock.restore();
}); });
it('should render provided data', (done) => { it('should render provided data', (done) => {
...@@ -440,7 +440,7 @@ describe('ee merge request widget options', () => { ...@@ -440,7 +440,7 @@ describe('ee merge request widget options', () => {
}); });
afterEach(() => { afterEach(() => {
mock.reset(); mock.restore();
}); });
it('should render error indicator', (done) => { it('should render error indicator', (done) => {
...@@ -487,7 +487,7 @@ describe('ee merge request widget options', () => { ...@@ -487,7 +487,7 @@ describe('ee merge request widget options', () => {
}); });
afterEach(() => { afterEach(() => {
mock.reset(); mock.restore();
}); });
it('should render provided data', (done) => { it('should render provided data', (done) => {
...@@ -518,7 +518,7 @@ describe('ee merge request widget options', () => { ...@@ -518,7 +518,7 @@ describe('ee merge request widget options', () => {
}); });
afterEach(() => { afterEach(() => {
mock.reset(); mock.restore();
}); });
it('should render error indicator', (done) => { it('should render error indicator', (done) => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment