This package contains generic integration tests for Claude remote tool implementations.
The integration tests are designed to be implementation-agnostic, allowing them to test multiple remote implementations (SSH, Docker, etc.) with the same test suite. Each test is parameterized to run against all available implementations of each tool type.
# Run all tests
pnpm test
# Watch mode
pnpm test:watchTests require the SSH sandbox to be running:
# From the repository root
cd sandbox
docker-compose up -dTo add tests for a new remote implementation:
- Update
src/setup.tsto add setup/teardown functions and getter functions for the new connection - In each test file, add new factory entries to the
implementationsarray
Example structure in src/setup.ts:
let newConnection: RemoteConnection;
export async function setupNewRemote(): Promise<void> {
newConnection = await createConnection();
}
export function teardownNewRemote(): void {
newConnection?.close();
}
export function getNewConnection(): RemoteConnection {
return newConnection;
}Example usage in test files (e.g., src/file.test.ts):
const implementations: Array<{
name: string;
createFileTool: () => FileTool;
}> = [
{
name: 'ssh-sftp',
createFileTool: () => new FileTool(getSSHSFTP()),
},
{
name: 'new-remote',
createFileTool: () => new FileTool(getNewConnection()),
},
];The existing test cases will automatically run against all implementations using
describe.each().