Skip to content

Conversation

@itsmeadi
Copy link
Contributor

@itsmeadi itsmeadi commented Feb 11, 2026

https://getstream.slack.com/archives/C02PXEZ6MCN/p1770808024415289?thread_ts=1770733955.430939&cid=C02PXEZ6MCN

Changes

Conditionally run user flagging integration tests only when APP_ID is 16792 (accounts with moderation enabled).

Why

User flagging tests require moderation features to be enabled on the Stream account. These tests:

  • ✅ Pass on APP_ID 16792 (moderation enabled)
  • ❌ Fail on other APP_IDs with 404 errors (moderation not enabled)

This prevents test failures when the SDK is tested from StreamAPI repo or other environments without moderation features.

Implementation

const shouldRunModerationTests = config.APP_ID === '16792';
const describeOrSkip = shouldRunModerationTests ? describe : describe.skip;

Tests

With APP_ID 16792:

  • ✅ All 4 user flagging tests run and pass

With other APP_IDs (e.g., StreamAPI repo):

  • ⏭️ Tests are skipped (shown as pending)
  • ✅ No test failures

Related

The client.flagUser() test requires moderation features to be enabled
on the account. Skipping this test to prevent CI failures.
Only run user flagging tests when APP_ID is 16792 (account with moderation enabled).
This prevents test failures in environments without moderation features (e.g., StreamAPI repo).

Tests will:
- Run on APP_ID 16792 (moderation enabled)
- Skip on other APP_IDs (moderation not enabled)
Add comment explaining that APP_ID 6743 (default test app) can't have
moderation enabled as it would break other existing tests. This is why
we conditionally run moderation tests only on APP_ID 16792.
Remove internal implementation details and keep it professional.
Just state that these tests require moderation features.
Explain that APP_ID 16792 has moderation enabled, while other test
apps (e.g., StreamAPI CI) have it disabled, hence the conditional skip.
@itsmeadi itsmeadi enabled auto-merge (squash) February 11, 2026 11:10
@itsmeadi itsmeadi merged commit 6961d67 into main Feb 11, 2026
7 checks passed
@itsmeadi itsmeadi deleted the FEEDS-1195 branch February 11, 2026 11:11
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.

2 participants