Skip to content

Commit 03dd7fa

Browse files
committed
fixtures folder
1 parent 1eb9340 commit 03dd7fa

13 files changed

+16
-13
lines changed
File renamed without changes.

src/integration-tests/process-cleanup.test.ts renamed to src/integration-tests/processCleanup.test.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
import path from 'node:path';
12
import { Readable, Writable } from 'node:stream';
23
import { Client } from '../client/index.js';
34
import { StdioClientTransport } from '../client/stdio.js';
45
import { Server } from '../server/index.js';
56
import { StdioServerTransport } from '../server/stdio.js';
67
import { LoggingMessageNotificationSchema } from '../types.js';
78

9+
const FIXTURES_DIR = path.resolve(__dirname, '../__fixtures__');
10+
811
describe('Process cleanup', () => {
912
vi.setConfig({ testTimeout: 5000 }); // 5 second timeout
1013

@@ -54,8 +57,8 @@ describe('Process cleanup', () => {
5457

5558
const transport = new StdioClientTransport({
5659
command: 'node',
57-
args: ['--import', 'tsx', 'test-server.ts'],
58-
cwd: __dirname
60+
args: ['--import', 'tsx', 'testServer.ts'],
61+
cwd: FIXTURES_DIR
5962
});
6063

6164
await client.connect(transport);
@@ -81,8 +84,8 @@ describe('Process cleanup', () => {
8184

8285
const transport = new StdioClientTransport({
8386
command: 'node',
84-
args: ['--import', 'tsx', 'server-that-hangs.ts'],
85-
cwd: __dirname
87+
args: ['--import', 'tsx', 'serverThatHangs.ts'],
88+
cwd: FIXTURES_DIR
8689
});
8790

8891
await client.connect(transport);

src/integration-tests/stateManagementStreamableHttp.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
ListPromptsResultSchema,
1313
LATEST_PROTOCOL_VERSION
1414
} from '../types.js';
15-
import { zodTestMatrix, type ZodMatrixEntry } from '../shared/zodTestMatrix.js';
15+
import { zodTestMatrix, type ZodMatrixEntry } from '../__fixtures__/zodTestMatrix.js';
1616

1717
describe.each(zodTestMatrix)('$zodVersionLabel', (entry: ZodMatrixEntry) => {
1818
const { z } = entry;

src/integration-tests/taskResumability.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { McpServer } from '../server/mcp.js';
77
import { StreamableHTTPServerTransport } from '../server/streamableHttp.js';
88
import { CallToolResultSchema, LoggingMessageNotificationSchema } from '../types.js';
99
import { InMemoryEventStore } from '../examples/shared/inMemoryEventStore.js';
10-
import { zodTestMatrix, type ZodMatrixEntry } from '../shared/zodTestMatrix.js';
10+
import { zodTestMatrix, type ZodMatrixEntry } from '../__fixtures__/zodTestMatrix.js';
1111

1212
describe.each(zodTestMatrix)('$zodVersionLabel', (entry: ZodMatrixEntry) => {
1313
const { z } = entry;

src/server/completable.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { completable, getCompleter } from './completable.js';
2-
import { zodTestMatrix, type ZodMatrixEntry } from '../shared/zodTestMatrix.js';
2+
import { zodTestMatrix, type ZodMatrixEntry } from '../__fixtures__/zodTestMatrix.js';
33

44
describe.each(zodTestMatrix)('completable with $zodVersionLabel', (entry: ZodMatrixEntry) => {
55
const { z } = entry;

src/server/mcp.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
import { completable } from './completable.js';
2323
import { McpServer, ResourceTemplate } from './mcp.js';
2424
import { InMemoryTaskStore } from '../experimental/tasks/stores/in-memory.js';
25-
import { zodTestMatrix, type ZodMatrixEntry } from '../shared/zodTestMatrix.js';
25+
import { zodTestMatrix, type ZodMatrixEntry } from '../__fixtures__/zodTestMatrix.js';
2626

2727
function createLatch() {
2828
let latch = false;

src/server/sse.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { McpServer } from './mcp.js';
66
import { createServer, type Server } from 'node:http';
77
import { AddressInfo } from 'node:net';
88
import { CallToolResult, JSONRPCMessage } from '../types.js';
9-
import { zodTestMatrix, type ZodMatrixEntry } from '../shared/zodTestMatrix.js';
9+
import { zodTestMatrix, type ZodMatrixEntry } from '../__fixtures__/zodTestMatrix.js';
1010

1111
const createMockResponse = () => {
1212
const res = {

src/server/streamableHttp.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { EventStore, StreamableHTTPServerTransport, EventId, StreamId } from './
55
import { McpServer } from './mcp.js';
66
import { CallToolResult, JSONRPCMessage } from '../types.js';
77
import { AuthInfo } from './auth/types.js';
8-
import { zodTestMatrix, type ZodMatrixEntry } from '../shared/zodTestMatrix.js';
8+
import { zodTestMatrix, type ZodMatrixEntry } from '../__fixtures__/zodTestMatrix.js';
99

1010
async function getFreePort() {
1111
return new Promise(res => {

0 commit comments

Comments
 (0)