Skip to content

test: restore real timers after rate limit tests#837

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
fathiaoyinloye:feat/restore-real-timers-ratelimit-tests
Jun 29, 2026
Merged

test: restore real timers after rate limit tests#837
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
fathiaoyinloye:feat/restore-real-timers-ratelimit-tests

Conversation

@fathiaoyinloye

Copy link
Copy Markdown
Contributor

closes #710

Description

Restored real timers after each test in the rate-limit test suite by adding afterEach(() => { vi.useRealTimers(); }) to src/app/api/tutorials/__tests__/ratelimit.test.ts.

This isolates fake timer usage to the test suite that requires it, preventing timer state from leaking into other test files and reducing order-dependent test flakiness.

Related Issue

Closes #

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • No console errors
  • Uses Lucide icons consistently
  • Responsive design implemented
  • Starknet best practices followed

@drips-wave

drips-wave Bot commented Jun 29, 2026

Copy link
Copy Markdown

@fathiaoyinloye Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Thank you for contributing to the project.

@RUKAYAT-CODER RUKAYAT-CODER merged commit e8d256d into rinafcode:main Jun 29, 2026
4 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.

[Bug] Fake timers not restored after rate-limit tests — state leaks between test suites

2 participants