Skip to content

Commit 9c9e50c

Browse files
committed
Run yarn run demo
1 parent c90f54b commit 9c9e50c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/auth/src/core/auth/auth_impl.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,10 @@ describe('core/auth/auth_impl', () => {
369369
expect(exchangeTokenStub).not.to.have.been.called;
370370
});
371371

372-
it('should refresh the token if it is expired and a token refresh handler is set', async () => {
373-
persistenceStub._get.withArgs(tokenKey).resolves(expiredMockToken as any);
372+
it('should refresh the token if token is expiring in next 1 minute and a token refresh handler is set', async () => {
373+
persistenceStub._get
374+
.withArgs(tokenKey)
375+
.resolves(soonToExpireMockToken as any);
374376
auth.setTokenRefreshHandler(tokenRefreshHandler);
375377

376378
exchangeTokenStub.callsFake(async () => {
@@ -389,10 +391,8 @@ describe('core/auth/auth_impl', () => {
389391
expect(token).to.eql('test-token');
390392
});
391393

392-
it('should refresh the token if token is expiring in next 1 minute and a token refresh handler is set', async () => {
393-
persistenceStub._get
394-
.withArgs(tokenKey)
395-
.resolves(soonToExpireMockToken as any);
394+
it('should refresh the token if it is expired and a token refresh handler is set', async () => {
395+
persistenceStub._get.withArgs(tokenKey).resolves(expiredMockToken as any);
396396
auth.setTokenRefreshHandler(tokenRefreshHandler);
397397

398398
exchangeTokenStub.callsFake(async () => {

0 commit comments

Comments
 (0)