Skip to content

Commit

Permalink
Fix unit tests as per expiration type change
Browse files Browse the repository at this point in the history
  • Loading branch information
Amplifiyer committed Mar 27, 2020
1 parent 210410f commit fe6aaf6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/__tests__/Credentials-test.ts
Expand Up @@ -47,11 +47,11 @@ describe('Credentials test', () => {
Amplify.register(cacheClass);
const credentials = new Credentials(null);

const expiration = new Date().getTime() + 20 * 60 * 1000;
const expiration = new Date(new Date().getTime() + 20 * 60 * 1000);
credentials['_credentials'] = {
expiration,
};
credentials['_nextCredentialsRefresh'] = expiration + 1;
credentials['_nextCredentialsRefresh'] = expiration.getTime() + 1;
expect(await credentials.get()).toEqual(credentials['_credentials']);
});

Expand Down

0 comments on commit fe6aaf6

Please sign in to comment.