test(frontend): Migrate from describe/it to flat test() pattern (#35305)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Evan Rusackas
2025-09-28 11:45:33 -07:00
committed by GitHub
parent ff102aadb3
commit d62249d13f
255 changed files with 2017 additions and 1554 deletions

View File

@@ -30,6 +30,7 @@ const defaultProps: TimeOffsetControlsProps = {
onChange: jest.fn(),
};
// eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks
describe('TimeOffsetControls', () => {
const setup = (initialState = {}) => {
const store = mockStore({
@@ -55,7 +56,7 @@ describe('TimeOffsetControls', () => {
return { store, props };
};
it('TimeOffsetControl renders DatePicker when startDate is set', () => {
test('TimeOffsetControl renders DatePicker when startDate is set', () => {
setup();
const datePickerInput = screen.getByRole('textbox');
expect(datePickerInput).toBeInTheDocument();
@@ -64,7 +65,7 @@ describe('TimeOffsetControls', () => {
// Our Time comparison control depends on this string for supporting date deletion on date picker
// That's why this test is linked to the TimeOffsetControl component
it('Dayjs should return "Invalid date" when parsing an invalid date string', () => {
test('Dayjs should return "Invalid date" when parsing an invalid date string', () => {
const invalidDate = extendedDayjs('not-a-date');
expect(invalidDate.format()).toBe(INVALID_DATE);
});