Skip to content

test: cover rate limiter behavior#23

Open
Kkkakania wants to merge 1 commit into
Aaromalpm:mainfrom
Kkkakania:test/rate-limit-coverage
Open

test: cover rate limiter behavior#23
Kkkakania wants to merge 1 commit into
Aaromalpm:mainfrom
Kkkakania:test/rate-limit-coverage

Conversation

@Kkkakania

Copy link
Copy Markdown

What does this PR do?

Adds real Socket.IO client/server coverage for the createRateLimiter() middleware.

Related issue

Closes #18

Type of change

  • Bug fix
  • New feature
  • Tests
  • Documentation

Checklist

  • npm test passes with no failures
  • New feature includes tests
  • No new dependencies added (unless discussed in the issue)
  • TypeScript types updated in src/index.d.ts if new functions were added

Notes

The new tests cover allowed messages, blocked messages and rateLimit:exceeded
payload fields, window reset behavior, event filters, custom onLimitReached
callbacks, and a disconnect/reconnect path.

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.

test: add tests for rate limiter

1 participant