File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
packages/auth/src/core/auth Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff 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 ( ) => {
You can’t perform that action at this time.
0 commit comments