-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: provide info message on stamped version instead of warning (#9739)
**Related Issue:** #9721 ## Summary This updates the message displayed when components load to show the version, build date and revision (similar to Maps SDK). It will log an info message instead of a warning as it could be misinterpreted and would also show up multiple times when a bundled `calcite-components` version would be overridden. **Note**: `console.info` messages will be omitted by default across all tests to avoid noise
- Loading branch information
Showing
4 changed files
with
33 additions
and
14 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 |
---|---|---|
@@ -1,15 +1,20 @@ | ||
let globalError: jest.SpyInstance; | ||
let globalLog: jest.SpyInstance; | ||
|
||
beforeAll(() => { | ||
globalError = jest.spyOn(global.console, "error"); | ||
globalLog = jest.spyOn(global.console, "info").mockImplementation(() => null); | ||
}); | ||
|
||
beforeEach(() => globalError.mockClear()); | ||
beforeEach(() => { | ||
globalError.mockClear(); | ||
globalLog.mockClear(); | ||
}); | ||
|
||
// eslint-disable-next-line jest/no-standalone-expect | ||
afterEach(() => expect(globalError).not.toHaveBeenCalled()); | ||
|
||
afterAll(() => { | ||
globalError.mockClear(); | ||
globalError.mockRestore(); | ||
globalLog.mockRestore(); | ||
}); |
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