Skip to content

Commit

Permalink
Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
poovamraj committed Aug 9, 2023
1 parent 4826185 commit 7c5aa23
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
20 changes: 10 additions & 10 deletions src/auth/__tests__/__snapshots__/index.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ exports[`auth Multifactor Challenge Flow should require MFA Token 1`] = `
exports[`auth OOB flow binding code should be optional 1`] = `
{
"accessToken": "1234",
"expiresAt": 2023-01-02T00:00:00.000Z,
"expiresAt": 1672617600,
"idToken": "id-123",
"scope": "openid profile email address phone",
"tokenType": "Bearer",
Expand Down Expand Up @@ -65,7 +65,7 @@ exports[`auth OOB flow should handle malformed OOB code 1`] = `[invalid_grant: M
exports[`auth OOB flow should handle success with binding code 1`] = `
{
"accessToken": "1234",
"expiresAt": 2023-01-02T00:00:00.000Z,
"expiresAt": 1672617600,
"idToken": "id-123",
"scope": "openid profile email address phone",
"tokenType": "Bearer",
Expand All @@ -75,7 +75,7 @@ exports[`auth OOB flow should handle success with binding code 1`] = `
exports[`auth OOB flow should handle success without binding code 1`] = `
{
"accessToken": "1234",
"expiresAt": 2023-01-02T00:00:00.000Z,
"expiresAt": 1672617600,
"idToken": "id-123",
"scope": "openid profile email address phone",
"tokenType": "Bearer",
Expand Down Expand Up @@ -129,7 +129,7 @@ exports[`auth OTP flow when MFA is not associated 1`] = `[unsupported_challenge_
exports[`auth OTP flow when MFA succeeds 1`] = `
{
"accessToken": "1234",
"expiresAt": 2023-01-02T00:00:00.000Z,
"expiresAt": 1672617600,
"idToken": "id-123",
"scope": "openid profile email address phone",
"tokenType": "Bearer",
Expand Down Expand Up @@ -174,7 +174,7 @@ exports[`auth Recovery Code flow should require MFA Token and Recovery Code 1`]
exports[`auth Recovery Code flow when Recovery code succeeds 1`] = `
{
"accessToken": "1234",
"expiresAt": 2023-01-02T00:00:00.000Z,
"expiresAt": 1672617600,
"idToken": "id-123",
"scope": "openid profile email address phone",
"tokenType": "Bearer",
Expand Down Expand Up @@ -224,7 +224,7 @@ exports[`auth code exchange for native social should handle unexpected error 1`]
exports[`auth code exchange for native social should return successful response 1`] = `
{
"accessToken": "an access token",
"expiresAt": 2062-02-13T23:31:30.000Z,
"expiresAt": 2907099090,
"idToken": "an id token",
"scope": "openid",
"state": "a random state for auth",
Expand All @@ -234,7 +234,7 @@ exports[`auth code exchange for native social should return successful response
exports[`auth code exchange for native social should return successful response with optional parameters 1`] = `
{
"accessToken": "an access token",
"expiresAt": 2062-02-13T23:31:30.000Z,
"expiresAt": 2907099090,
"idToken": "an id token",
"scope": "openid",
"state": "a random state for auth",
Expand Down Expand Up @@ -296,7 +296,7 @@ exports[`auth code exchange should handle unexpected error 1`] = `[a0.response.i
exports[`auth code exchange should return successful response 1`] = `
{
"accessToken": "an access token",
"expiresAt": 2062-02-13T23:31:30.000Z,
"expiresAt": 2907099090,
"idToken": "an id token",
"scope": "openid",
"state": "a random state for auth",
Expand Down Expand Up @@ -427,7 +427,7 @@ exports[`auth password realm should handle unexpected error 1`] = `[a0.response.
exports[`auth password realm should return successful response 1`] = `
{
"accessToken": "an access token",
"expiresAt": 2062-02-13T23:31:30.000Z,
"expiresAt": 2907099090,
"idToken": "an id token",
"scope": "openid",
"state": "a random state for auth",
Expand Down Expand Up @@ -829,7 +829,7 @@ exports[`auth refresh token should handle unknown error 1`] = `[a0.response.inva
exports[`auth refresh token should return successful response 1`] = `
{
"accessToken": "an access token",
"expiresAt": 2062-02-13T23:31:30.000Z,
"expiresAt": 2907099090,
"idToken": "an id token",
"scope": "openid",
"state": "a random state for auth",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('credentials manager tests', () => {
idToken: '1234',
accessToken: '1234',
tokenType: 'Bearer',
expiresIn: 86000,
expiresAt: 1691603391,
};

describe('test saving credentials', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ exports[`timestamp conversion test convertExpiresInToExpiresAt should handle nul

exports[`timestamp conversion test convertExpiresInToExpiresAt should handle undefined 1`] = `null`;

exports[`timestamp conversion test convertExpiresInToExpiresAt should handle zero 1`] = `1672531200000`;
exports[`timestamp conversion test convertExpiresInToExpiresAt should handle zero 1`] = `1672531200`;

exports[`timestamp conversion test convertExpiresInToExpiresAt should successfully convert 1`] = `1672617600000`;
exports[`timestamp conversion test convertExpiresInToExpiresAt should successfully convert 1`] = `1672617600`;

0 comments on commit 7c5aa23

Please sign in to comment.