Skip to content

Use real Workers resources in browser tools tests#1811

Merged
threepointone merged 1 commit into
mainfrom
reduce-workers-resource-mocks
Jun 26, 2026
Merged

Use real Workers resources in browser tools tests#1811
threepointone merged 1 commit into
mainfrom
reduce-workers-resource-mocks

Conversation

@mattzcarey

@mattzcarey mattzcarey commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace the Think browser-tools test's fake DurableObjectState/Fetcher/WorkerLoader with real Workers-pool resources
  • add a test-only Durable Object host so createBrowserTools runs with real DO ctx, ctx.exports, facets, and env.LOADER
  • add a test-only loopback WorkerEntrypoint to stand in for a Browser Run binding without raw object mocks

Validation

  • pnpm --filter @cloudflare/think exec vitest --run -c src/tests/vitest.config.ts src/tests/browser-tools.test.ts
  • pnpm exec nx run @cloudflare/think:test
  • pnpm --filter @cloudflare/think exec tsc --noEmit

@changeset-bot

changeset-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 715a50c

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

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@mattzcarey mattzcarey force-pushed the reduce-workers-resource-mocks branch from f85cbc3 to 3f7059b Compare June 25, 2026 12:38
@pkg-pr-new

pkg-pr-new Bot commented Jun 25, 2026

Copy link
Copy Markdown

Open in StackBlitz

agents

npm i https://pkg.pr.new/agents@1811

@cloudflare/ai-chat

npm i https://pkg.pr.new/@cloudflare/ai-chat@1811

@cloudflare/codemode

npm i https://pkg.pr.new/@cloudflare/codemode@1811

create-think

npm i https://pkg.pr.new/create-think@1811

hono-agents

npm i https://pkg.pr.new/hono-agents@1811

@cloudflare/shell

npm i https://pkg.pr.new/@cloudflare/shell@1811

@cloudflare/think

npm i https://pkg.pr.new/@cloudflare/think@1811

@cloudflare/voice

npm i https://pkg.pr.new/@cloudflare/voice@1811

@cloudflare/worker-bundler

npm i https://pkg.pr.new/@cloudflare/worker-bundler@1811

commit: 715a50c

@mattzcarey mattzcarey force-pushed the reduce-workers-resource-mocks branch from 3f7059b to 715a50c Compare June 25, 2026 12:47
@threepointone threepointone merged commit 0a0fe0c into main Jun 26, 2026
4 checks passed
@threepointone threepointone deleted the reduce-workers-resource-mocks branch June 26, 2026 06:16
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