fix: correct test syntax for headers verification

Fix syntax error where expect().rejects.toThrow() was not properly closed
before the headers assertion.
This commit is contained in:
stranger2904
2026-01-14 15:10:45 -05:00
parent c9ef648c60
commit 951df07c0f

View File

@@ -475,15 +475,13 @@ describe("SkillMcpManager", () => {
// Headers are passed through to the transport
await expect(manager.getOrCreateClient(info, config)).rejects.toThrow(
/Failed to connect/
)
// Verify headers were forwarded to transport
expect(lastTransportInstance.options?.requestInit?.headers).toEqual({
Authorization: "Bearer test-token",
"X-Custom-Header": "custom-value",
})
)
})
it("works without headers (optional)", async () => {