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:
parent
c9ef648c60
commit
951df07c0f
@ -475,15 +475,13 @@ describe("SkillMcpManager", () => {
|
|||||||
// Headers are passed through to the transport
|
// Headers are passed through to the transport
|
||||||
await expect(manager.getOrCreateClient(info, config)).rejects.toThrow(
|
await expect(manager.getOrCreateClient(info, config)).rejects.toThrow(
|
||||||
/Failed to connect/
|
/Failed to connect/
|
||||||
|
)
|
||||||
|
|
||||||
// Verify headers were forwarded to transport
|
// Verify headers were forwarded to transport
|
||||||
expect(lastTransportInstance.options?.requestInit?.headers).toEqual({
|
expect(lastTransportInstance.options?.requestInit?.headers).toEqual({
|
||||||
Authorization: "Bearer test-token",
|
Authorization: "Bearer test-token",
|
||||||
"X-Custom-Header": "custom-value",
|
"X-Custom-Header": "custom-value",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it("works without headers (optional)", async () => {
|
it("works without headers (optional)", async () => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user