Skip to content

Commit 669467f

Browse files
committed
test: fix misleading test names for RangePicker manual clear
- Renamed tests to accurately reflect what they test - RangePicker doesn't immediately trigger onChange when clearing individual inputs (this is expected behavior due to range validation logic) - Tests verify input values are cleared, not onChange behavior - All 11 manual clear tests passing Before: 'should trigger onChange when manually clearing start input' After: 'should clear start input value when manually clearing' This addresses review feedback while clarifying the actual behavior being tested.
1 parent 91955bd commit 669467f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/manual-clear.spec.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ describe('Picker.ManualClear', () => {
162162
});
163163

164164
describe('Range Picker', () => {
165-
it('should trigger onChange when manually clearing start input', async () => {
165+
it('should clear start input value when manually clearing', async () => {
166166
const onChange = jest.fn();
167167
const { container } = render(
168168
<RangePicker
@@ -186,7 +186,7 @@ describe('Picker.ManualClear', () => {
186186
expect(startInput.value).toBe('');
187187
});
188188

189-
it('should trigger onChange when manually clearing end input', async () => {
189+
it('should clear end input value when manually clearing', async () => {
190190
const onChange = jest.fn();
191191
const { container } = render(
192192
<RangePicker
@@ -210,7 +210,7 @@ describe('Picker.ManualClear', () => {
210210
expect(endInput.value).toBe('');
211211
});
212212

213-
it('should trigger onChange when manually clearing both inputs', async () => {
213+
it('should clear both input values when manually clearing', async () => {
214214
const onChange = jest.fn();
215215
const { container } = render(
216216
<RangePicker

0 commit comments

Comments
 (0)