clean up tests - remove mockRequestInfo
This commit is contained in:
parent
166da76b00
commit
606c278668
1 changed files with 47 additions and 73 deletions
|
|
@ -14,21 +14,13 @@ import {
|
|||
LoggingMessageNotificationSchema,
|
||||
Notification,
|
||||
TextContent,
|
||||
ElicitRequestSchema,
|
||||
ElicitRequestSchema
|
||||
} from "../types.js";
|
||||
import { ResourceTemplate } from "./mcp.js";
|
||||
import { completable } from "./completable.js";
|
||||
import { UriTemplate } from "../shared/uriTemplate.js";
|
||||
import { RequestInfo } from "./types/types.js";
|
||||
import { getDisplayName } from "../shared/metadataUtils.js";
|
||||
|
||||
const mockRequestInfo: RequestInfo = {
|
||||
headers: {
|
||||
'content-type': 'application/json',
|
||||
'accept': 'application/json',
|
||||
},
|
||||
};
|
||||
|
||||
describe("McpServer", () => {
|
||||
/***
|
||||
* Test: Basic Server Instance
|
||||
|
|
@ -222,8 +214,7 @@ describe("ResourceTemplate", () => {
|
|||
signal: abortController.signal,
|
||||
requestId: 'not-implemented',
|
||||
sendRequest: () => { throw new Error("Not implemented") },
|
||||
sendNotification: () => { throw new Error("Not implemented") },
|
||||
requestInfo: mockRequestInfo
|
||||
sendNotification: () => { throw new Error("Not implemented") }
|
||||
});
|
||||
expect(result?.resources).toHaveLength(1);
|
||||
expect(list).toHaveBeenCalled();
|
||||
|
|
|
|||
Loading…
Reference in a new issue