Skip to content
Snippets Groups Projects
Commit 0f5f77a0 authored by Filipa Lacerda's avatar Filipa Lacerda
Browse files

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

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

See merge request gitlab-org/gitlab-ce!16647
parents 8d338d73 0711ebbd
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -63,7 +63,7 @@ We have also decided against using [axios interceptors] because they are not sui
});
 
afterEach(() => {
mock.reset();
mock.restore();
});
```
 
Loading
Loading
Loading
Loading
@@ -45,7 +45,7 @@ describe('iPython notebook renderer', () => {
});
 
afterEach(() => {
mock.reset();
mock.restore();
});
 
it('does not show loading icon', () => {
Loading
Loading
@@ -96,7 +96,7 @@ describe('iPython notebook renderer', () => {
});
 
afterEach(() => {
mock.reset();
mock.restore();
});
 
it('does not show loading icon', () => {
Loading
Loading
@@ -127,7 +127,7 @@ describe('iPython notebook renderer', () => {
});
 
afterEach(() => {
mock.reset();
mock.restore();
});
 
it('does not show loading icon', () => {
Loading
Loading
Loading
Loading
@@ -55,7 +55,7 @@ describe('Board card', () => {
});
 
afterEach(() => {
mock.reset();
mock.restore();
});
 
it('returns false when detailIssue is empty', () => {
Loading
Loading
Loading
Loading
@@ -60,7 +60,7 @@ describe('Board list component', () => {
});
 
afterEach(() => {
mock.reset();
mock.restore();
});
 
it('renders component', () => {
Loading
Loading
Loading
Loading
@@ -58,7 +58,7 @@ describe('Issue boards new issue form', () => {
 
afterEach(() => {
vm.$destroy();
mock.reset();
mock.restore();
});
 
it('calls submit if submit button is clicked', (done) => {
Loading
Loading
Loading
Loading
@@ -35,7 +35,7 @@ describe('Store', () => {
});
 
afterEach(() => {
mock.reset();
mock.restore();
});
 
it('starts with a blank state', () => {
Loading
Loading
Loading
Loading
@@ -30,7 +30,7 @@ describe('List model', () => {
});
 
afterEach(() => {
mock.reset();
mock.restore();
});
 
it('gets issues when created', (done) => {
Loading
Loading
Loading
Loading
@@ -59,7 +59,7 @@ describe('Issuable output', () => {
});
 
afterEach(() => {
mock.reset();
mock.restore();
realtimeRequestCount = 0;
 
vm.poll.stop();
Loading
Loading
Loading
Loading
@@ -12,6 +12,10 @@ describe('JobMediator', () => {
mock = new MockAdapter(axios);
});
 
afterEach(() => {
mock.restore();
});
it('should set defaults', () => {
expect(mediator.store).toBeDefined();
expect(mediator.service).toBeDefined();
Loading
Loading
@@ -24,10 +28,6 @@ describe('JobMediator', () => {
mock.onGet().reply(200, job, {});
});
 
afterEach(() => {
mock.restore();
});
it('should store received data', (done) => {
mediator.fetchJob();
setTimeout(() => {
Loading
Loading
Loading
Loading
@@ -38,7 +38,7 @@ describe('Dashboard', () => {
});
 
afterEach(() => {
mock.reset();
mock.restore();
});
 
it('shows up a loading state', (done) => {
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment