Skip to content

test: cover new pair form flow#43

Open
gaoflow wants to merge 1 commit into
StableRoute-Org:mainfrom
gaoflow:test/pairs-17-new-pair-form
Open

test: cover new pair form flow#43
gaoflow wants to merge 1 commit into
StableRoute-Org:mainfrom
gaoflow:test/pairs-17-new-pair-form

Conversation

@gaoflow

@gaoflow gaoflow commented Jun 21, 2026

Copy link
Copy Markdown

Summary

  • add test coverage for the /pairs/new form contract
  • mock useRouter and apiPost to verify redirect behavior without navigation
  • cover identical assets, successful submit, server error, and in-flight loading state

Closes #17

Tests

  • npm test -- src/app/pairs/new/page.test.tsx --runInBand
  • npm run lint
  • npm test -- --runInBand
  • npm test -- --coverage --runInBand
  • npm run build

Coverage note: app/pairs/new/page.tsx reports 100% statement, branch, function, and line coverage in the coverage run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tests for the new-pair form validation and submit-redirect flow

1 participant