-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix debounce forwarding in batchTriggerAndWait arrays #3446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@trigger.dev/sdk": patch | ||
| --- | ||
|
|
||
| Forward per-item debounce options in array batchTriggerAndWait calls. |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 batchTrigger_internal array path silently drops per-item debounce options The PR fixes the missing (Refers to lines 2234-2236) Was this helpful? React with 👍 or 👎 to provide feedback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚩 New tests use vi.doMock/vi.fn contrary to repo testing conventions
The new
batchTriggerAndWait debounce forwardingtest suite atpackages/trigger-sdk/src/v3/shared.test.ts:222-332usesvi.doMock,vi.fn(),vi.resetModules(), andvi.restoreAllMocks(). The repository's testing guidelines inai/references/tests.md:78-83explicitly state 'Do not mock anything', 'Do not use mocks in tests', and 'Do not use spies in tests'. However, this is a case where testing SDK option forwarding through internal functions practically requires mocking the API client and runtime — there's no Redis/Postgres dependency where testcontainers could substitute. The prose inai/references/tests.md:26also says 'We almost NEVER mock anything' (emphasis on 'almost'), suggesting rare exceptions exist. Worth discussing whether this test approach is acceptable or if an alternative testing strategy should be used.Was this helpful? React with 👍 or 👎 to provide feedback.