Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions test/integration/stdio_integration_test.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import 'dart:async';
import 'dart:io';
import 'dart:convert';
import 'dart:io';

import 'package:mcp_dart/mcp_dart.dart';
import 'package:test/test.dart';

import '../../tool/testing/smoke_programs.dart';

void main() {
group('stdio transport integration test', () {
late Client client;
Expand All @@ -13,8 +15,8 @@ void main() {
StreamSubscription<String>? stderrSub;

// Path to the example stdio server file
final String serverFilePath =
'${Directory.current.path}/example/server_stdio.dart';
const sourcePath = 'example/server_stdio.dart';
final String serverFilePath = '${Directory.current.path}/$sourcePath';

setUp(() async {
// Verify the server file exists
Expand All @@ -32,7 +34,7 @@ void main() {
transport = StdioClientTransport(
StdioServerParameters(
command: Platform.resolvedExecutable,
args: [serverFilePath],
args: ['${Directory.current.path}/${smokeProgram(sourcePath)}'],
stderrMode: ProcessStartMode.normal, // Pipe stderr for debugging
),
);
Expand Down
Loading