UNPKG

syia-mcp-utils

Version:

Global utility functions for MCP server

38 lines (29 loc) โ€ข 1.01 kB
#!/usr/bin/env node // Simple script to test getDataLink with your credentials console.log('๐Ÿงช Testing getDataLink function...\n'); // Load test configuration require('./test/test-config'); // Import the function const { getDataLink } = require('./dist/helper_functions'); async function testGetDataLink() { // Test data const testData = [ { id: 1, name: 'Test Vessel', imo: 123456789 }, { id: 2, name: 'Test Vessel 2', imo: 987654321 }, ]; try { console.log('๐Ÿ“ค Sending test data:', JSON.stringify(testData, null, 2)); console.log('โณ Waiting for response...\n'); const result = await getDataLink(testData); console.log('โœ… Test PASSED!'); console.log('๐Ÿ“ฅ Received data link:', result); console.log('๐Ÿ”— Link length:', result.length); } catch (error) { console.error('โŒ Test FAILED!'); console.error('Error:', error.message); console.error('Stack:', error.stack); process.exit(1); } } // Run the test testGetDataLink();