-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(react): add custom logger option to FeatureHubContext (#408)
The FeatureHubContext provides the custom logger to the FeatureAppLoader and FeatureAppContainer.
- Loading branch information
1 parent
3b372dc
commit 470acd3
Showing
6 changed files
with
163 additions
and
79 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import {Logger} from '@feature-hub/core'; | ||
|
||
export type MockLogger = { | ||
readonly [key in keyof Logger]: Logger[key] & jest.Mock | ||
}; | ||
|
||
export const logger: MockLogger = { | ||
trace: jest.fn(), | ||
debug: jest.fn(), | ||
info: jest.fn(), | ||
warn: jest.fn(), | ||
error: jest.fn() | ||
}; |
Oops, something went wrong.