Skip to content

test: add onDeleteRequest test to verify browser history navigation#33

Merged
jermzblake merged 1 commit into
mainfrom
add-task-navigation-tests
Mar 30, 2026
Merged

test: add onDeleteRequest test to verify browser history navigation#33
jermzblake merged 1 commit into
mainfrom
add-task-navigation-tests

Conversation

@jermzblake

Copy link
Copy Markdown
Owner

This pull request adds a new test to the useTaskDetailLogic hook's test suite to verify navigation behavior after a delete request. The test ensures that when there is browser navigation history and no onClose handler, the hook correctly calls window.history.back().

Testing improvements:

  • Added a test case to useTaskDetailLogic.test.tsx to verify that onDeleteRequest uses browser history back navigation when appropriate, using a spy on window.history.back to confirm the behavior.
  • Imported spyOn from bun:test to support the new test case.

@jermzblake
jermzblake merged commit 710d1f1 into main Mar 30, 2026
7 checks passed
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.

1 participant