mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-05 02:14:05 +00:00
style: format server and shared with prettier
A mechanical prettier --write over server/src, server/tests, server/scripts and shared/src with the workspaces' .prettierrc; nothing but layout and import order changes, and every file keeps the same set of imports. shared is formatted throughout and its format baseline is empty. The server baseline keeps the 35 files that Prettier would grow past their lint:size limit (they need a split first, which is not a formatting change), and the generated entity files stay as their generator writes them.
This commit is contained in:
@@ -6,8 +6,11 @@
|
||||
* in mcp-tool-schema.test.ts; this file covers the intersection, the gates, the
|
||||
* caps and the result envelope.
|
||||
*/
|
||||
import { PluginMcpToolsService, toMcpTextResult } from '../../../src/nest/plugins/contributions/plugin-mcp-tools.service';
|
||||
import type { McpContext } from '../../../src/nest-mcp';
|
||||
import {
|
||||
PluginMcpToolsService,
|
||||
toMcpTextResult,
|
||||
} from '../../../src/nest/plugins/contributions/plugin-mcp-tools.service';
|
||||
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
@@ -102,8 +105,12 @@ describe('the advertised surface', () => {
|
||||
const { svc } = makeService({
|
||||
providers: ['broken', 'weather'],
|
||||
declared: {
|
||||
get weather() { return [weatherTool]; },
|
||||
get broken(): never { throw new Error('bad row'); },
|
||||
get weather() {
|
||||
return [weatherTool];
|
||||
},
|
||||
get broken(): never {
|
||||
throw new Error('bad row');
|
||||
},
|
||||
} as never,
|
||||
implemented: { weather: ['forecast'], broken: ['x'] },
|
||||
});
|
||||
@@ -177,7 +184,11 @@ describe('invoking a tool', () => {
|
||||
});
|
||||
|
||||
it('MCPTOOLS-013: maps a throwing plugin to a tool error, not a protocol fault', async () => {
|
||||
const { svc } = makeService({ callTool: vi.fn(async () => { throw new Error('upstream 503'); }) });
|
||||
const { svc } = makeService({
|
||||
callTool: vi.fn(async () => {
|
||||
throw new Error('upstream 503');
|
||||
}),
|
||||
});
|
||||
const res = await invoke(svc);
|
||||
expect(res.isError).toBe(true);
|
||||
expect(res.content[0].text).toContain('upstream 503');
|
||||
|
||||
Reference in New Issue
Block a user