Skip to content

Commit fc3181c

Browse files
galshirclaude
andauthored
test(form-core): expect prevValue in the multi-field linked listener spec
The target field does not change, so its listener receives its own previous value, an empty string, on both calls. This was the one watched-field assertion the earlier commits did not update, and it failed pnpm test:lib. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent a480960 commit fc3181c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎packages/form-core/tests/FieldApi/listeners.spec.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,11 +664,13 @@ describe('field - listeners', () => {
664664
expect(listener).toHaveBeenCalledTimes(2)
665665
expect(listener).toHaveBeenNthCalledWith(1, {
666666
value: '',
667+
prevValue: '',
667668
fieldApi: targetField,
668669
formApi: form,
669670
})
670671
expect(listener).toHaveBeenNthCalledWith(2, {
671672
value: '',
673+
prevValue: '',
672674
fieldApi: targetField,
673675
formApi: form,
674676
})

0 commit comments

Comments
 (0)