x402-toolpick / tree / test/desc-length.test.js ยท raw (this view has old GitHub links rewritten for the mirror; raw is byte-exact)
import test from 'node:test';
import assert from 'node:assert/strict';
import { ROUTES } from '../src/tool.js';

// CDP rejects payments when the x402 resource description is over 500 characters.
test('every paid route description is 1-500 characters', () => {
  for (const r of ROUTES) assert.ok(r.desc && r.desc.length <= 500, `${r.path}: ${r.desc?.length} chars`);
});

agentgate-source: code mirror on Cloudflare Pages. All repos