Skip to content

Commit f5ca941

Browse files
author
sthangavel
committed
StopRefresh once test is done.
1 parent 2d7812e commit f5ca941

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/OAuthClientTest.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,15 @@ describe('Tests for AutoRefresh', () => {
9898
expect(authResponse.getToken().access_token)
9999
.to.be.equal(expectedAccessToken.access_token);
100100
expect(oauthClientWithAutoRefresh.autoRefreshHandle).to.not.equal(undefined);
101+
oauthClientWithAutoRefresh.stopAutoRefresh();
101102
});
102103

103104
oauthClientWithAutoRefreshAndInterval.createToken(parseRedirect)
104105
.then((authResponse) => {
105106
expect(authResponse.getToken().access_token)
106107
.to.be.equal(expectedAccessToken.access_token);
107108
expect(oauthClientWithAutoRefreshAndInterval.autoRefreshHandle).to.not.equal(undefined);
109+
oauthClientWithAutoRefreshAndInterval.stopAutoRefresh();
108110
});
109111
});
110112
});
@@ -154,6 +156,8 @@ describe('Tests for AutoRefresh', () => {
154156
// Advance clock again (55 minutes)
155157
this.clock.tick(55 * 60 * 1000);
156158
expect(refreshCallSpy.calledTwice).to.be.true;
159+
160+
oauthClientWithAutoRefresh.stopAutoRefresh();
157161
});
158162
});
159163
});
@@ -199,6 +203,8 @@ describe('Tests for AutoRefresh', () => {
199203
// Advance clock again (3 seconds)
200204
this.clock.tick(3 * 1000);
201205
expect(refreshCallSpy.calledTwice).to.be.true;
206+
207+
oauthClientWithAutoRefreshAndInterval.stopAutoRefresh();
202208
});
203209
});
204210
});
@@ -251,6 +257,8 @@ describe('Tests for AutoRefresh', () => {
251257
// Advance clock again (55 minutes)
252258
this.clock.tick(55 * 60 * 1000);
253259
expect(refreshCallSpy.calledOnce).to.not.be.true;
260+
261+
oauthClientWithAutoRefresh.stopAutoRefresh();
254262
});
255263
});
256264
});

0 commit comments

Comments
 (0)