Repository navigation
test: fix the two pre-existing failures that keep API CI red - #177
Merged
Merged
Conversation
…y's date Enrollment stamps a contact's entry with the faked clock, but the seeded sequence and emails got updated_at from Postgres's real now(). Once the hard-coded start (2026-11-02T09:00Z) passed, the early-send check saw the sequence as changed after entry and skipped its report, so 'reports an email scheduled before its delay' started failing. Seed those rows at the faked time instead. Co-Authored-By: Claude <noreply@anthropic.com>
…ckground
Both mocked the database as {} and then imported the MCP server, which
starts Better Auth. Its OAuth plugin seeds resources in the background with
db.select, so each file left an unhandled 'db.select is not a function' and
the API test job exited 1 even with every test passing. Use the test
database instead, as the other API tests do.
Co-Authored-By: Claude <noreply@anthropic.com>
The async mock factory hung the conformance job, where parity.test.ts shares a process with platform-conformance.test.ts. Build the database first and mock it with a plain synchronous factory. Co-Authored-By: Claude <noreply@anthropic.com>
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.
main's API test job fails for two reasons that have nothing to do with each other. Both are test-only fixes; no app code changes.1. A date-dependent sequence test (failing since 2026-11-02)
"reports an email scheduled before its delay, and still sends it" in
apps/api/src/automation/sequence-journey.test.ts.setSystemTime), but the seeded sequence and emails getupdated_atfrom Postgres's realnow().subscribeAtseeds the sequence's and emails' timestamps at the faked enrollment time. Checked with start dates in 2020, today and 2030.2. Unhandled errors from the MCP tests (since #174)
src/mcp/server.test.tsandsrc/mcp/parity.test.tsmocked the database as{}and imported the MCP server, which starts Better Auth. Its OAuth plugin seeds resources in the background withdb.select, so each file left an unhandleddb.select is not a function. The job exited 1 with every test passing.src/mcp: 129 pass, no unhandled errors.🤖 Generated with Claude Code