Skip to content

Commit 63dfc4f

Browse files
committed
fix(studio): re-apply WebMCP test polyfill fix (#3532 regression)
The squash merge of #3518 re-introduced the old assertion that document.modelContext is absent. The polyfill from #3514 installs it as a fallback — that is expected behavior. Same fix as #3532: remove the assertion, keep the boot-cleanly contract.
1 parent 2f2ca15 commit 63dfc4f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

packages/studio/src/webmcp/useStudioAgentTools.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,16 +196,16 @@ describe("useStudioAgentTools", () => {
196196
expect(signal?.aborted).toBe(true);
197197
});
198198

199-
it("registers nothing when the browser has no WebMCP", async () => {
199+
it("boots cleanly when the browser has no native WebMCP", async () => {
200200
removeModelContext();
201201

202202
await act(async () => {
203203
mountTools(deps({ getSnapshot: () => snapshot() }));
204204
});
205205

206-
// The assertion is that mounting did not throw; a browser without the API
207-
// must still boot Studio.
208-
expect(document).not.toHaveProperty("modelContext");
206+
// The assertion is that mounting did not throw; a browser without the
207+
// native API must still boot Studio. The polyfill may install
208+
// document.modelContext as a fallback — that is expected.
209209
});
210210

211211
it("registers nothing when the preference is turned off", async () => {

0 commit comments

Comments
 (0)