Skip to main content
Glama
textract-bot.test.ts795 B
// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors // SPDX-License-Identifier: Apache-2.0 import { MockClient } from '@medplum/mock'; import { expect, test } from 'vitest'; import { handler } from './textract-bot'; test('AWS Textract', async () => { const medplum = new MockClient(); // Mock the medplum.post method medplum.post = async () => ({ JobStatus: 'SUCCEEDED', Blocks: [ { BlockType: 'WORD', Text: 'Hello' }, { BlockType: 'WORD', Text: 'World' }, ], }); const result = await handler(medplum, { bot: { reference: 'Bot/123' }, contentType: 'application/fhir+json', input: { resourceType: 'Media', id: '456' }, secrets: {}, }); expect(result).toBeDefined(); expect(result).toEqual('Hello\nWorld'); });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/medplum/medplum'

If you have feedback or need assistance with the MCP directory API, please join our Discord server