Files
2026-03-02 12:14:09 -08:00

31 lines
911 B
JavaScript

#!/usr/bin/env node
/**
* Minimal tests for CCIP Relay Service.
* Run with: npm test
* Does not start the relay or connect to RPC.
* For full tests, set PRIVATE_KEY (or RELAYER_PRIVATE_KEY) and run; config load will then validate.
*/
import { existsSync } from 'fs';
import { join, dirname } from 'path';
import { fileURLToPath } from 'url';
const __dirname = dirname(fileURLToPath(import.meta.url));
function assert(condition, message) {
if (!condition) {
console.error('FAIL:', message);
process.exit(1);
}
}
console.log('Relay service structure tests...');
assert(existsSync(join(__dirname, 'src', 'config.js')), 'src/config.js should exist');
assert(existsSync(join(__dirname, 'src', 'RelayService.js')), 'src/RelayService.js should exist');
assert(existsSync(join(__dirname, 'index.js')), 'index.js should exist');
console.log('OK: relay service structure valid');
process.exit(0);