Skip to content

Commit 12c9b70

Browse files
committed
fix task killing on windows mcp integration test
1 parent 0fc739e commit 12c9b70

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

renamify-mcp/src/index.test.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,17 @@ describe('MCP Server', () => {
1111

1212
afterEach(() => {
1313
if (serverProcess) {
14-
serverProcess.kill();
14+
// Kill the process and all its children on Windows
15+
if (process.platform === 'win32' && serverProcess.pid) {
16+
spawn('taskkill', ['/pid', serverProcess.pid.toString(), '/f', '/t']);
17+
} else {
18+
serverProcess.kill();
19+
}
1520
serverProcess = null;
1621
}
1722
});
1823

19-
it('should start without errors', async () => {
24+
it('should start without errors', { timeout: 10_000 }, async () => {
2025
const serverPath = join(__dirname, '..', 'dist', 'index.js');
2126

2227
// Start the server with node
@@ -91,7 +96,7 @@ describe('MCP Server', () => {
9196
});
9297
});
9398

94-
it('should list available tools', async () => {
99+
it('should list available tools', { timeout: 10_000 }, async () => {
95100
const serverPath = join(__dirname, '..', 'dist', 'index.js');
96101

97102
serverProcess = spawn('node', [serverPath], {

0 commit comments

Comments
 (0)