Skip to content

Add Jest E2E tests for trueforge-core - #431

Open
ramantehlan wants to merge 2 commits into
mainfrom
sd/e2e-test
Open

Add Jest E2E tests for trueforge-core#431
ramantehlan wants to merge 2 commits into
mainfrom
sd/e2e-test

Conversation

@ramantehlan

@ramantehlan ramantehlan commented Aug 25, 2026

Copy link
Copy Markdown

Summary

Adds a Jest E2E harness for @truefoundry/trueforge-core with a mocked LLM and a first orchestrator loop test.

Changes

  • Separate tests/e2e tree and jest.e2e.config.cjs, kept out of unit Jest
  • pnpm test:e2e / pnpm test:trueforge-core:e2e; core pnpm test runs units then E2E
  • Sample test: mocked text LLM, no tools, send + execute through AgentThreadOrchestrator

How was this tested?

  • pnpm --filter @truefoundry/trueforge-core test:e2e
  • pnpm --filter @truefoundry/trueforge-core typecheck

Checklist

  • I have read the contributing guidelines
  • pnpm build, pnpm test, pnpm typecheck, pnpm lint:ci, and pnpm format:check pass locally
  • Tests added/updated where it makes sense
  • No hand-edits to generated code (packages/trueforge-sdk, .github/fern/openapi/openapi.json, docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge
  • Docs / .env.example updated if configuration or behavior changed

Note

Low Risk
Test and CI wiring only; no production runtime or API behavior changes.

Overview
Introduces a separate Jest E2E path for @truefoundry/trueforge-core: tests/e2e/ runs via jest.e2e.config.cjs (longer timeout, single worker) while unit Jest excludes that tree so suites do not double-run.

Scripts: core pnpm test now runs unit Jest then E2E; pnpm test:e2e and root pnpm test:trueforge-core:e2e run E2E only. tsconfig.json includes the new config file.

First E2E case: mocked streaming text LLM helpers plus a test that drives AgentThreadOrchestrator through sendexecute, asserting model stream events, terminal AGENT_DONE, execution result, and persisted thread context—with no tools or sub-agents.

Reviewed by Cursor Bugbot for commit 4fa5242. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot

changeset-bot Bot commented Aug 25, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 7974d6c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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.

1 participant