-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
19 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,7 +108,7 @@ describe('API Key Interceptors', () => { | |
packageName: 'my-lil-website' | ||
}); | ||
expect(response.config.headers['Api-Key']).toBe('123'); | ||
expect(response.config.headers['Authorization']).toBe( | ||
expect(response.config.headers.Authorization).toBe( | ||
`Bearer ${MOCK_JWT_KEY}` | ||
); | ||
}); | ||
|
@@ -125,7 +125,7 @@ describe('API Key Interceptors', () => { | |
packageName: 'my-lil-website' | ||
}); | ||
expect(response.config.headers['Api-Key']).toBe('123'); | ||
expect(response.config.headers['Authorization']).toBe( | ||
expect(response.config.headers.Authorization).toBe( | ||
`Bearer ${MOCK_JWT_KEY}` | ||
); | ||
}); | ||
|
@@ -230,8 +230,8 @@ describe('API Key Interceptors', () => { | |
await updateUserEmail('[email protected]'); | ||
|
||
jest.advanceTimersByTime(60000 * 4.1); | ||
/* | ||
called once originally, a second time after the email was changed, | ||
/* | ||
called once originally, a second time after the email was changed, | ||
and a third after the JWT was about to expire | ||
*/ | ||
expect(mockGenerateJWT).toHaveBeenCalledTimes(3); | ||
|
@@ -279,8 +279,8 @@ describe('API Key Interceptors', () => { | |
}); | ||
|
||
jest.advanceTimersByTime(60000 * 4.1); | ||
/* | ||
called once originally, a second time after the email was changed, | ||
/* | ||
called once originally, a second time after the email was changed, | ||
and a third after the JWT was about to expire | ||
*/ | ||
expect(mockGenerateJWT).toHaveBeenCalledTimes(3); | ||
|
@@ -313,8 +313,8 @@ describe('API Key Interceptors', () => { | |
}); | ||
|
||
jest.advanceTimersByTime(60000 * 4.1); | ||
/* | ||
called once originally, a second time after the email was changed, | ||
/* | ||
called once originally, a second time after the email was changed, | ||
and a third after the JWT was about to expire | ||
*/ | ||
expect(mockGenerateJWT).toHaveBeenCalledTimes(3); | ||
|
@@ -1075,7 +1075,7 @@ describe('User Identification', () => { | |
packageName: 'my-lil-website' | ||
}); | ||
expect(response.config.headers['Api-Key']).toBe('123'); | ||
expect(response.config.headers['Authorization']).toBe( | ||
expect(response.config.headers.Authorization).toBe( | ||
`Bearer ${MOCK_JWT_KEY}` | ||
); | ||
}); | ||
|
@@ -1092,7 +1092,7 @@ describe('User Identification', () => { | |
packageName: 'my-lil-website' | ||
}); | ||
expect(response.config.headers['Api-Key']).toBe('123'); | ||
expect(response.config.headers['Authorization']).toBe( | ||
expect(response.config.headers.Authorization).toBe( | ||
`Bearer ${MOCK_JWT_KEY}` | ||
); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters