Merge pull request #12282 from backstage/blam/fix-tests
chore: fix for the time tests
This commit is contained in:
@@ -89,6 +89,8 @@ describe('HeaderWorldClock with invalid Time Zone', () => {
|
||||
|
||||
describe('HeaderWorldClock with custom Time Format', () => {
|
||||
it('uses 24hr clock from custom Time Format', async () => {
|
||||
jest.useFakeTimers().setSystemTime(new Date('2022-06-28T09:10:13.502Z'));
|
||||
|
||||
const clockConfigs: ClockConfig[] = [
|
||||
{
|
||||
label: 'UTC',
|
||||
@@ -111,7 +113,6 @@ describe('HeaderWorldClock with custom Time Format', () => {
|
||||
</ThemeProvider>,
|
||||
);
|
||||
|
||||
const currentTime = `${new Date().getHours()}:${new Date().getMinutes()}`;
|
||||
expect(rendered.getByText(currentTime)).toBeInTheDocument();
|
||||
expect(rendered.getByText('09:10')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user