Skip to content

Commit 1631967

Browse files
committed
fix: linting in server test
1 parent ccd9ec3 commit 1631967

File tree

1 file changed

+4
-21
lines changed

1 file changed

+4
-21
lines changed

src/server/index.test.ts

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
/* eslint-disable @typescript-eslint/no-unused-vars */
2-
/* eslint-disable no-constant-binary-expression */
3-
/* eslint-disable @typescript-eslint/no-unused-expressions */
4-
import { Ajv } from 'ajv';
52
import { z } from 'zod';
63
import { Client } from '../client/index.js';
74
import { InMemoryTransport } from '../inMemory.js';
@@ -21,18 +18,8 @@ import {
2118
SetLevelRequestSchema,
2219
SUPPORTED_PROTOCOL_VERSIONS
2320
} from '../types.js';
24-
import { AjvJsonSchemaValidator } from '../validation/ajv-provider.js';
2521
import { Server } from './index.js';
2622

27-
// Set up AJV validator for elicitation tests
28-
const ajv = new Ajv({
29-
strict: false,
30-
validateFormats: false,
31-
validateSchema: false
32-
});
33-
34-
const ajvProvider = new AjvJsonSchemaValidator(ajv);
35-
3623
test('should accept latest protocol version', async () => {
3724
let sendPromiseResolve: (value: unknown) => void;
3825
const sendPromise = new Promise(resolve => {
@@ -289,8 +276,7 @@ test('should respect client elicitation capabilities', async () => {
289276
tools: {},
290277
logging: {}
291278
},
292-
enforceStrictCapabilities: true,
293-
jsonSchemaValidator: ajvProvider
279+
enforceStrictCapabilities: true
294280
}
295281
);
296282

@@ -372,8 +358,7 @@ test('should validate elicitation response against requested schema', async () =
372358
tools: {},
373359
logging: {}
374360
},
375-
enforceStrictCapabilities: true,
376-
jsonSchemaValidator: ajvProvider
361+
enforceStrictCapabilities: true
377362
}
378363
);
379364

@@ -450,8 +435,7 @@ test('should reject elicitation response with invalid data', async () => {
450435
tools: {},
451436
logging: {}
452437
},
453-
enforceStrictCapabilities: true,
454-
jsonSchemaValidator: ajvProvider
438+
enforceStrictCapabilities: true
455439
}
456440
);
457441

@@ -520,8 +504,7 @@ test('should allow elicitation reject and cancel without validation', async () =
520504
tools: {},
521505
logging: {}
522506
},
523-
enforceStrictCapabilities: true,
524-
jsonSchemaValidator: ajvProvider
507+
enforceStrictCapabilities: true
525508
}
526509
);
527510

0 commit comments

Comments
 (0)