Skip to content

Add a fake-timer test for useQuiz timer auto-submit on expiry #947

Description

@RUKAYAT-CODER

Overview
src/hooks/useQuiz.tsx (lines 209-229) runs an interval that decrements the remaining time and calls complete() at zero, but src/hooks/tests/useQuiz.test.tsx only covers grading helpers and one answer/score flow — there is no test verifying auto-submit at expiry, that the timer clears on completion, or that it does not run in review mode. Add a fake-timer test asserting complete() fires and isCompleted becomes true at expiry.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions