Skip to content

Add integration tests for webhook event type filter (BUY/SELL) - #499

Merged
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
10xwhoman:test/webhook-event-type-filter-integration
Jun 26, 2026
Merged

Add integration tests for webhook event type filter (BUY/SELL)#499
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
10xwhoman:test/webhook-event-type-filter-integration

Conversation

@10xwhoman

Copy link
Copy Markdown
Contributor

Summary

  • Adds webhook-event-filter.integration.test.ts with 5 tests using real Prisma against a test SQLite DB
  • Verifies buy-only webhooks don't fire on sell events (and vice versa)
  • Verifies cross-isolation: buy-only and sell-only webhooks co-exist and each receives only their event type
  • Seeds/cleans real DB records in beforeAll/afterAll; per-test webhook create/delete in beforeEach/afterEach

Test plan

  • npm test -- webhook-event-filter.integration passes (5 tests)
  • Buy-only webhook: no SELL WebhookEvent, gets BUY WebhookEvent
  • Sell-only webhook: no BUY WebhookEvent, gets SELL WebhookEvent
  • Cross-isolation: both webhook types co-exist correctly

Closes #461

… time

Verifies event type filtering is enforced at dispatch time for
buy-only and sell-only webhooks:

- buy-only webhook does NOT receive sell events
- buy-only webhook DOES receive buy events
- sell-only webhook does NOT receive buy events
- sell-only webhook DOES receive sell events
- Both types co-exist correctly — each receives only their subscribed type

Seeds real DB records via Prisma and cleans up in afterAll, following
the same pattern as webhook.integration.test.ts.

Closes accesslayerorg#461
@drips-wave

drips-wave Bot commented Jun 26, 2026

Copy link
Copy Markdown

@10xwhoman 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

@Chucks1093
Chucks1093 merged commit 5fdab92 into accesslayerorg:main Jun 26, 2026
1 check 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.

Add integration test for trade webhook firing only for registered event types

2 participants