test(tenancy): un-skip reportFirstDmSent POST assertion (#129)#151
Open
truffle-dev wants to merge 1 commit into
Open
test(tenancy): un-skip reportFirstDmSent POST assertion (#129)#151truffle-dev wants to merge 1 commit into
truffle-dev wants to merge 1 commit into
Conversation
) The reportFirstDmSent "POSTs to /first_dm_sent" test was marked test.todo after a Bun 1.3.13 CI flake where a closure-captured-array recorder reported expect(count).toBe(1) as 0. The passing reportAgentReady sibling already avoids this by overriding globalThis.fetch with a plain async function that mutates only scalar locals, restored in a try/finally. Mirror that exact pattern here so the first_dm_sent body and headers are actually asserted rather than skipped.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #129.
The
reportFirstDmSent"POSTs to /v1/tenant_status/first_dm_sent" test was left astest.todoafter a Bun 1.3.13 CI flake: a closure-captured-array recorder reportedexpect(count).toBe(1)as0, even though the structurally identicalreportAgentReadysibling passed on the same runtime.The sibling already sidesteps this by overriding
globalThis.fetchwith a plain async function that mutates only scalar locals, restored in atry/finally. This change mirrors that pattern forreportFirstDmSentso thefirst_dm_sentURL, method, content-type, and{ slack_message_ts }body are actually asserted instead of skipped.The remaining four
reportFirstDmSenttests (empty-ts guard, non-2xx best-effort, fetch-rejection) were already real and untouched.Verification on local Bun:
bun run lint(biome) andbun run typecheck(tsc --noEmit) both clean.