-
Notifications
You must be signed in to change notification settings - Fork 32
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
115 changed files
with
4,807 additions
and
5,252 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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// __mocks__/keycloak-js.js | ||
|
||
// Mock implementation of the Keycloak class | ||
const Keycloak = jest.fn(() => ({ | ||
init: jest.fn().mockResolvedValue(true), // Mocks successful initialization | ||
login: jest.fn().mockResolvedValue(true), // Mocks successful login | ||
logout: jest.fn().mockResolvedValue(true), // Mocks successful logout | ||
authenticated: true, // Mocks that the user is authenticated | ||
accountManagement: jest.fn(), // Mocks account management | ||
token: 'mock-token', // Mocks a token | ||
updateToken: jest.fn().mockResolvedValue(true), // Mocks token refresh | ||
authServerUrl: 'http://mock-server-url', // Mocks the auth server URL | ||
realm: 'mock-realm', // Mocks the realm | ||
})); | ||
|
||
// Export the mock class | ||
module.exports = Keycloak; |
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
Oops, something went wrong.